diff --git a/headers/os/interface/InterfaceDefs.h b/headers/os/interface/InterfaceDefs.h index 4c4158ea39..637e848778 100644 --- a/headers/os/interface/InterfaceDefs.h +++ b/headers/os/interface/InterfaceDefs.h @@ -62,7 +62,10 @@ enum { B_PAGE_UP = 0x0b, B_PAGE_DOWN = 0x0c, - B_FUNCTION_KEY = 0x10 + B_FUNCTION_KEY = 0x10, + + B_KATAKANA_HIRAGANA = 0xf2, + B_ZENKAKU_HANKAKU = 0xf3 }; enum { diff --git a/src/servers/input/InputServer.cpp b/src/servers/input/InputServer.cpp index f6dc551ff3..b92c2f6742 100644 --- a/src/servers/input/InputServer.cpp +++ b/src/servers/input/InputServer.cpp @@ -1525,9 +1525,10 @@ InputServer::_SanitizeEvents(EventList& events) PRINT(("SanitizeEvents: %lx, %lx\n", fKeyInfo.modifiers, fKeyInfo.key_states[KEY_Spacebar >> 3])); - int8 byte; - if ((fKeyInfo.modifiers & B_COMMAND_KEY) != 0 - && event->FindInt8("byte", &byte) == B_OK && byte == ' ') { + int8 byte = 0; + event->FindInt8("byte", &byte); + if ((fKeyInfo.modifiers & B_COMMAND_KEY) != 0 + && (byte == ' ' || static_cast(byte) == B_ZENKAKU_HANKAKU)) { SetNextMethod(!fKeyInfo.modifiers & B_SHIFT_KEY); // this event isn't sent to the user