Skip to content

Commit

Permalink
Hint: always show except lettres (a-z/A-Z)
Browse files Browse the repository at this point in the history
Some locales have shifted chars likel ç ° ä ö ü which are helpful to be
visible

Signed-off-by: Jean-Pierre Rasquin <[email protected]>
  • Loading branch information
yank555-lu committed Jan 5, 2019
1 parent a3e6702 commit 674c51b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ public String getHintLabel(boolean wantAscii, boolean wantAll) {
hint = "";
if (shiftLabel != null && !isSimpleUppercase) {
char c = shiftLabel.charAt(0);
if (wantAll || wantAscii && is7BitAscii(c)) {
if (wantAll || wantAscii && isNotAlpha(c)) {
hint = Character.toString(c);
}
}
Expand All @@ -664,6 +664,11 @@ private static boolean is7BitAscii(char c) {
if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) return false;
return c >= 32 && c < 127;
}

private static boolean isNotAlpha(char c) {
if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) return false;
return true;
}

/**
* Informs the key that it has been pressed, in case it needs to change its appearance or
Expand Down

0 comments on commit 674c51b

Please sign in to comment.