HotKeys: Add OC_INPUT_TYPING_CONFIRM
@@ -404,24 +404,12 @@ OcGetPickerKeyInfo (
}
//
- // Handle typing
+ // Handle typing chars.
//
- if (FilterForTyping) {
- if (UnicodeChar >= 32 && UnicodeChar < 128) {
+ if (FilterForTyping && UnicodeChar >= 32 && UnicodeChar < 128) {
PickerKeyInfo->TypingChar = (CHAR8)UnicodeChar;
}
- if (OcKeyMapHasKey (Keys, NumKeys, AppleHidUsbKbUsageKeyEscape)) {
- PickerKeyInfo->OcKeyCode = OC_INPUT_TYPING_CLEAR_ALL;
- return;
- }
-
- if (OcKeyMapHasKey (Keys, NumKeys, AppleHidUsbKbUsageKeyBackSpace)) {
- PickerKeyInfo->OcKeyCode = OC_INPUT_TYPING_BACKSPACE;
- return;
- }
- }
-
//
// Handle VoiceOver - non-repeating.
//
@@ -470,6 +458,23 @@ OcGetPickerKeyInfo (
PickerKeyInfo->OcKeyCode = OC_INPUT_TYPING_RIGHT;
return;
}
+
+ if (Keys[0] == AppleHidUsbKbUsageKeyEscape) {
+ PickerKeyInfo->OcKeyCode = OC_INPUT_TYPING_CLEAR_ALL;
+ return;
+ }
+
+ if (Keys[0] ==AppleHidUsbKbUsageKeyBackSpace) {
+ PickerKeyInfo->OcKeyCode = OC_INPUT_TYPING_BACKSPACE;
+ return;
+ }
+
+ if (Keys[0] == AppleHidUsbKbUsageKeyEnter
+ || Keys[0] == AppleHidUsbKbUsageKeyReturn
+ || Keys[0] == AppleHidUsbKbUsageKeyPadEnter) {
+ PickerKeyInfo->OcKeyCode = OC_INPUT_TYPING_CONFIRM;
+ return;
+ }
} else {
//
// Non-typing index key strokes.
