Add extra symbols to Fn

Also removed almost all combinations of diacritics and symbols to create extra
symbols.
This commit is contained in:
ArenaL5 2022-03-26 20:35:50 +00:00 committed by Jules Aguillon
parent 21c76b5b41
commit 4355225646

View File

@ -49,16 +49,8 @@ class KeyModifier
char c = k.char_; char c = k.char_;
if (k.char_ != KeyValue.CHAR_NONE) if (k.char_ != KeyValue.CHAR_NONE)
c = Character.toUpperCase(c); c = Character.toUpperCase(c);
if (c == k.char_) // More rules if toUpperCase() did nothing if (c == k.char_) // Used to have more rules if toUpperCase() did nothing
switch (k.symbol) return k;
{
case "": c = '⇒'; break;
case "": c = '⇐'; break;
case "<": c = '«'; break;
case ">": c = '»'; break;
case "": c = '”'; break;
default: return k;
}
return k.withCharAndSymbol(c); return k.withCharAndSymbol(c);
} }
@ -69,54 +61,27 @@ class KeyModifier
case KeyValue.FLAG_ACCENT1: case KeyValue.FLAG_ACCENT1:
return (char)KeyCharacterMap.getDeadChar('\u02CB', c); return (char)KeyCharacterMap.getDeadChar('\u02CB', c);
case KeyValue.FLAG_ACCENT2: case KeyValue.FLAG_ACCENT2:
switch (c) return (char)KeyCharacterMap.getDeadChar('\u00B4', c);
{
case '`': return '´';
case '<': return '';
case '>': return '';
default: return (char)KeyCharacterMap.getDeadChar('\u00B4', c);
}
case KeyValue.FLAG_ACCENT3: case KeyValue.FLAG_ACCENT3:
return (char)KeyCharacterMap.getDeadChar('\u02C6', c); return (char)KeyCharacterMap.getDeadChar('\u02C6', c);
case KeyValue.FLAG_ACCENT4: case KeyValue.FLAG_ACCENT4:
switch (c) return (char)KeyCharacterMap.getDeadChar('\u02DC', c);
{
case '?': return '¿';
case '!': return '¡';
default: return (char)KeyCharacterMap.getDeadChar('\u02DC', c);
}
case KeyValue.FLAG_ACCENT5: case KeyValue.FLAG_ACCENT5:
switch (c) switch (c)
{ {
case 'u': return 'µ'; case 'u': return 'µ';
case '"': return '„';
case '\'': return '';
case '-': return '¬';
case 'a': return 'æ'; case 'a': return 'æ';
case 'o': return 'œ'; case 'o': return 'œ';
default: return (char)KeyCharacterMap.getDeadChar('\u00B8', c); default: return (char)KeyCharacterMap.getDeadChar('\u00B8', c);
} }
case KeyValue.FLAG_ACCENT6: case KeyValue.FLAG_ACCENT6:
switch (c) return (char)KeyCharacterMap.getDeadChar('\u00A8', c);
{
case '-': return '÷';
default: return (char)KeyCharacterMap.getDeadChar('\u00A8', c);
}
case KeyValue.FLAG_ACCENT_CARON: case KeyValue.FLAG_ACCENT_CARON:
switch (c) return (char)KeyCharacterMap.getDeadChar('\u02C7', c);
{
default: return (char)KeyCharacterMap.getDeadChar('\u02C7', c);
}
case KeyValue.FLAG_ACCENT_RING: case KeyValue.FLAG_ACCENT_RING:
switch (c) return (char)KeyCharacterMap.getDeadChar('\u02DA', c);
{
default: return (char)KeyCharacterMap.getDeadChar('\u02DA', c);
}
case KeyValue.FLAG_ACCENT_MACRON: case KeyValue.FLAG_ACCENT_MACRON:
switch (c) return (char)KeyCharacterMap.getDeadChar('\u00AF', c);
{
default: return (char)KeyCharacterMap.getDeadChar('\u00AF', c);
}
case KeyValue.FLAG_ACCENT_ORDINAL: case KeyValue.FLAG_ACCENT_ORDINAL:
switch (c) switch (c)
{ {
@ -215,15 +180,29 @@ class KeyModifier
case "down": name = "page_down"; break; case "down": name = "page_down"; break;
case "left": name = "home"; break; case "left": name = "home"; break;
case "right": name = "end"; break; case "right": name = "end"; break;
case ">": name = ""; break; case "<": name = "«"; break;
case "<": name = ""; break; case ">": name = "»"; break;
case "\"": name = ""; break; case "{": name = ""; break;
case "}": name = ""; break;
case "[": name = ""; break;
case "]": name = ""; break;
case "(": name = ""; break;
case ")": name = ""; break;
case "'": name = ""; break;
case "\"": name = ""; break;
case "-": name = ""; break; case "-": name = ""; break;
case "_": name = ""; break; case "_": name = ""; break;
case "^": name = "¬"; break;
case "%": name = ""; break;
case "=": name = ""; break;
case "esc": name = "insert"; break; case "esc": name = "insert"; break;
case "$": name = ""; break; case "$": name = ""; break;
case "#": name = "£"; break; case "#": name = "£"; break;
case "*": name = "°"; break; case "*": name = "°"; break;
case ".": name = ""; break;
case ",": name = "·"; break;
case "!": name = "¡"; break;
case "?": name = "¿"; break;
case "tab": name = "\\t"; break; case "tab": name = "\\t"; break;
case "": case "£": return removed_key; // Avoid showing these twice case "": case "£": return removed_key; // Avoid showing these twice
default: return k; default: return k;