-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quick Accent: Add currencies to VK_3 and VK_4 (most commonly used keys for currencies) #36665
Open
ansalls
wants to merge
6
commits into
microsoft:main
Choose a base branch
from
ansalls:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+34
−24
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
17a2589
Add currencies to VK_3 and VK_4 (most commonly used keys for currency…
ansalls 0c99507
Add generic currency symbol ¤, mapped to VK_O
ansalls b85ac1a
Remove erroneous temp file
ansalls c98d28b
Revert "Add generic currency symbol ¤, mapped to VK_O"
ansalls 16c1f05
Merge branch 'main' of https://github.com/ansalls/PowerToys
ansalls 06435c8
Add generic currency symbol ¤, mapped to VK_O back
ansalls File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -257,30 +257,40 @@ private static string[] GetDefaultLetterKeyCRH(LetterKey letter) | |
} | ||
|
||
// Currencies (source: https://www.eurochange.co.uk/travel-money/world-currency-abbreviations-symbols-and-codes-travel-money) | ||
private static string[] GetDefaultLetterKeyCUR(LetterKey letter) | ||
{ | ||
return letter switch | ||
{ | ||
LetterKey.VK_B => new[] { "฿", "в" }, | ||
LetterKey.VK_C => new[] { "¢", "₡", "č" }, | ||
LetterKey.VK_D => new[] { "₫" }, | ||
LetterKey.VK_E => new[] { "€" }, | ||
LetterKey.VK_F => new[] { "ƒ" }, | ||
LetterKey.VK_H => new[] { "₴" }, | ||
LetterKey.VK_K => new[] { "₭" }, | ||
LetterKey.VK_L => new[] { "ł" }, | ||
LetterKey.VK_N => new[] { "л" }, | ||
LetterKey.VK_M => new[] { "₼" }, | ||
LetterKey.VK_P => new[] { "£", "₽" }, | ||
LetterKey.VK_R => new[] { "₹", "៛", "﷼" }, | ||
LetterKey.VK_S => new[] { "$", "₪" }, | ||
LetterKey.VK_T => new[] { "₮", "₺", "₸" }, | ||
LetterKey.VK_W => new[] { "₩" }, | ||
LetterKey.VK_Y => new[] { "¥" }, | ||
LetterKey.VK_Z => new[] { "z" }, | ||
_ => Array.Empty<string>(), | ||
}; | ||
} | ||
private static string[] GetDefaultLetterKeyCUR(LetterKey letter) => letter switch | ||
{ | ||
LetterKey.VK_B => new[] { "฿", "в", "₿" }, | ||
LetterKey.VK_C => new[] { "¢", "₡", "č" }, | ||
LetterKey.VK_D => new[] { "₫" }, | ||
LetterKey.VK_E => new[] { "€", "£" }, | ||
LetterKey.VK_F => new[] { "ƒ" }, | ||
LetterKey.VK_H => new[] { "₴" }, | ||
LetterKey.VK_K => new[] { "₭" }, | ||
LetterKey.VK_L => new[] { "ł", "£" }, | ||
LetterKey.VK_M => new[] { "₼" }, | ||
LetterKey.VK_N => new[] { "л" }, | ||
LetterKey.VK_O => new[] { "¤" }, | ||
LetterKey.VK_P => new[] { "£", "₽" }, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same. Just like there's no dollar sign under the "D". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The pound sign is and was under P so this comment contradicts the existing code base. |
||
LetterKey.VK_R => new[] { "₹", "៛", "﷼" }, | ||
LetterKey.VK_S => new[] { "$", "₪" }, | ||
LetterKey.VK_T => new[] { "₮", "₺", "₸" }, | ||
LetterKey.VK_W => new[] { "₩" }, | ||
LetterKey.VK_Y => new[] { "¥" }, | ||
LetterKey.VK_Z => new[] { "z" }, | ||
LetterKey.VK_3 => new[] | ||
{ | ||
"฿", "в", "₿", "¢", "₡", "č", "₫", "€", "£", "ƒ", | ||
"₴", "₭", "ł", "₼", "л", "¤", "₽", "₹", "៛", "﷼", | ||
"$","₪", "₮", "₺", "₸", "₩", "¥", "z", | ||
}, // VK_3 is commonly used for the locale currency symbol | ||
LetterKey.VK_4 => new[] | ||
{ | ||
"฿", "в", "₿", "¢", "₡", "č", "₫", "€", "£", "ƒ", | ||
"₴", "₭", "ł", "₼", "л", "¤", "₽", "₹", "៛", "﷼", | ||
"$","₪", "₮", "₺", "₸", "₩", "¥", "z", | ||
}, // VK_4 is commonly used for the locale currency symbol | ||
_ => Array.Empty<string>(), | ||
}; | ||
|
||
// Croatian | ||
private static string[] GetDefaultLetterKeyHR(LetterKey letter) | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My opinion: the origin of the symbol - that is the letter L - outweighs a disputable visual resemblance. If it were we, I would not add it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But does anyone know that's the origin symbol? I live in England and I would not have guessed that. This suggestion feels like sacrificing usability for semantics. Also, with this change, it's in both, which was the suggested fix in the later posts in the issue, so both views are addressed.