add hide_self key to hide keyboard (#1329)

This commit is contained in:
Lokesh Kumar
2026-06-14 12:57:06 +02:00
committed by GitHub
parent a7645c3934
commit 27329091af
3 changed files with 6 additions and 0 deletions
+1
View File
@@ -190,6 +190,7 @@ Value | Meaning
`voice_typing` | Begin voice typing.
`voice_typing_chooser` | Shows a menu where you can choose which voice typing provider to use, then begins voice typing when you make a selection.
`shareText` | Emit a share Intent for the selected text. **Oddity:** This is in CamelCase.
`hide_self` | Hide the keyboard.
## Unused
These keys are known to do nothing.
+2
View File
@@ -24,6 +24,7 @@ public final class KeyValue implements Comparable<KeyValue>
CAPS_LOCK,
SWITCH_VOICE_TYPING,
SWITCH_VOICE_TYPING_CHOOSER,
HIDE_SELF,
}
// Must be evaluated in the reverse order of their values.
@@ -643,6 +644,7 @@ public final class KeyValue implements Comparable<KeyValue>
case "capslock": return eventKey(0xE012, Event.CAPS_LOCK, 0);
case "voice_typing": return eventKey(0xE015, Event.SWITCH_VOICE_TYPING, FLAG_SMALLER_FONT);
case "voice_typing_chooser": return VOICE_TYPING_CHOOSER;
case "hide_self": return eventKey("⊻", Event.HIDE_SELF, FLAG_SMALLER_FONT);
/* Key events */
case "esc": return keyeventKey("Esc", KeyEvent.KEYCODE_ESCAPE, FLAG_SMALLER_FONT);
+3
View File
@@ -477,6 +477,9 @@ public class Keyboard2 extends InputMethodService
VoiceImeSwitcher.choose_voice_ime(Keyboard2.this, get_imm(),
Config.globalPrefs());
break;
case HIDE_SELF:
Keyboard2.this.requestHideSelf(0);
break;
}
}