|
|
|
@@ -644,13 +644,20 @@ public final class TerminalView extends View {
|
|
|
|
if (resultingKeyCode > -1) {
|
|
|
|
if (resultingKeyCode > -1) {
|
|
|
|
handleKeyCode(resultingKeyCode, 0);
|
|
|
|
handleKeyCode(resultingKeyCode, 0);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
// The below two workarounds are needed on at least Logitech Keyboard k810 on Samsung Galaxy Tab Pro
|
|
|
|
// Work around bluetooth keyboards sending funny unicode characters instead
|
|
|
|
// (Android 4.4) with the stock Samsung Keyboard. They should be harmless when not used since the need
|
|
|
|
// of the more normal ones from ASCII that terminal programs expect - the
|
|
|
|
// to input the original characters instead of the new ones using the keyboard should be low.
|
|
|
|
// desire to input the original characters should be low.
|
|
|
|
// Rewrite U+02DC 'SMALL TILDE' to U+007E 'TILDE' for ~ to work in shells:
|
|
|
|
switch (codePoint) {
|
|
|
|
if (codePoint == 0x02DC) codePoint = 0x07E;
|
|
|
|
case 0x02DC: // SMALL TILDE.
|
|
|
|
// Rewrite U+02CB 'MODIFIER LETTER GRAVE ACCENT' to U+0060 'GRAVE ACCENT' for ` (backticks) to work:
|
|
|
|
codePoint = 0x007E; // TILDE (~).
|
|
|
|
if (codePoint == 0x02CB) codePoint = 0x60;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x02CB: // MODIFIER LETTER GRAVE ACCENT.
|
|
|
|
|
|
|
|
codePoint = 0x0060; // GRAVE ACCENT (`).
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x02C6: // MODIFIER LETTER CIRCUMFLEX ACCENT.
|
|
|
|
|
|
|
|
codePoint = 0x005E; // CIRCUMFLEX ACCENT (^).
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// If left alt, send escape before the code point to make e.g. Alt+B and Alt+F work in readline:
|
|
|
|
// If left alt, send escape before the code point to make e.g. Alt+B and Alt+F work in readline:
|
|
|
|
mTermSession.writeCodePoint(leftAltDownFromEvent, codePoint);
|
|
|
|
mTermSession.writeCodePoint(leftAltDownFromEvent, codePoint);
|
|
|
|
|