diff --git a/include/QF/keys.h b/include/QF/keys.h index 2617ea10f..4c99bd0c9 100644 --- a/include/QF/keys.h +++ b/include/QF/keys.h @@ -293,6 +293,28 @@ typedef enum { QFK_POWER = 320, /* Power Macintosh power key */ QFK_EURO = 321, /* Some european keyboards */ QFK_UNDO = 322, + + /* Japanese keys */ + QFK_KANJI, /* Kanji, Kanji convert */ + QFK_MUHENKAN, /* Cancel Conversion */ + QFK_HENKAN, /* Alias for Henkan_Mode */ + QFK_ROMAJI, /* to Romaji */ + QFK_HIRAGANA, /* to Hiragana */ + QFK_KATAKANA, /* to Katakana */ + QFK_HIRAGANA_kATAKANA, /* Hiragana/Katakana toggle */ + QFK_ZENKAKU, /* to Zenkaku */ + QFK_HANKAKU, /* to Hankaku */ + QFK_ZENKAKU_HANKAKU, /* Zenkaku/Hankaku toggle */ + QFK_TOUROKU, /* Add to Dictionary */ + QFK_MASSYO, /* Delete from Dictionary */ + QFK_KANA_LOCK, /* Kana Lock */ + QFK_KANA_SHIFT, /* Kana Shift */ + QFK_EISU_SHIFT, /* Alphanumeric Shift */ + QFK_EISU_TOGGLE, /* Alphanumeric toggle */ + QFK_KANJI_BANGOU, /* Codeinput */ + QFK_ZEN_KOHO, /* Multiple/All Candidate(s) */ + QFK_MAE_KOHO, /* Previous Candidate */ + /* Add any other keys here */ // diff --git a/libs/video/targets/in_x11.c b/libs/video/targets/in_x11.c index 0fcc6ba47..2c0924d1d 100644 --- a/libs/video/targets/in_x11.c +++ b/libs/video/targets/in_x11.c @@ -350,6 +350,12 @@ XLateKey (XKeyEvent * ev, int *k, int *u) case XK_Meta_R: key = QFK_RMETA; break; + case XK_Super_L: + key = QFK_LSUPER; + break; + case XK_Super_R: + key = QFK_RSUPER; + break; case XK_Multi_key: key = QFK_COMPOSE; @@ -433,6 +439,64 @@ XLateKey (XKeyEvent * ev, int *k, int *u) key = QFK_WORLD_64; break; + case XK_Kanji: + key = QFK_KANJI; + break; + case XK_Muhenkan: + key = QFK_MUHENKAN; + break; + case XK_Henkan: + key = QFK_HENKAN; + break; + case XK_Romaji: + key = QFK_ROMAJI; + break; + case XK_Hiragana: + key = QFK_HIRAGANA; + break; + case XK_Katakana: + key = QFK_KATAKANA; + break; + case XK_Hiragana_Katakana: + key = QFK_HIRAGANA_kATAKANA; + break; + case XK_Zenkaku: + key = QFK_ZENKAKU; + break; + case XK_Hankaku: + key = QFK_HANKAKU; + break; + case XK_Zenkaku_Hankaku: + key = QFK_ZENKAKU_HANKAKU; + break; + case XK_Touroku: + key = QFK_TOUROKU; + break; + case XK_Massyo: + key = QFK_MASSYO; + break; + case XK_Kana_Lock: + key = QFK_KANA_LOCK; + break; + case XK_Kana_Shift: + key = QFK_KANA_SHIFT; + break; + case XK_Eisu_Shift: + key = QFK_EISU_SHIFT; + break; + case XK_Eisu_toggle: + key = QFK_EISU_TOGGLE; + break; + case XK_Kanji_Bangou: + key = QFK_KANJI_BANGOU; + break; + case XK_Zen_Koho: + key = QFK_ZEN_KOHO; + break; + case XK_Mae_Koho: + key = QFK_MAE_KOHO; + break; + default: if (keysym < 128) { // ASCII keys key = keysym; diff --git a/libs/video/targets/keys.c b/libs/video/targets/keys.c index 88141ce12..84e5ba0c0 100644 --- a/libs/video/targets/keys.c +++ b/libs/video/targets/keys.c @@ -342,6 +342,27 @@ keyname_t keynames[] = { { "K_MENU", QFK_MENU }, { "K_POWER", QFK_POWER }, { "K_EURO", QFK_EURO }, + + { "K_KANJI", QFK_KANJI }, + { "K_MUHENKAN", QFK_MUHENKAN }, + { "K_HENKAN", QFK_HENKAN }, + { "K_ROMAJI", QFK_ROMAJI }, + { "K_HIRAGANA", QFK_HIRAGANA }, + { "K_KATAKANA", QFK_KATAKANA }, + { "K_HIRAGANA_kATAKANA", QFK_HIRAGANA_kATAKANA }, + { "K_ZENKAKU", QFK_ZENKAKU }, + { "K_HANKAKU", QFK_HANKAKU }, + { "K_ZENKAKU_HANKAKU", QFK_ZENKAKU_HANKAKU }, + { "K_TOUROKU", QFK_TOUROKU }, + { "K_MASSYO", QFK_MASSYO }, + { "K_KANA_LOCK", QFK_KANA_LOCK }, + { "K_KANA_SHIFT", QFK_KANA_SHIFT }, + { "K_EISU_SHIFT", QFK_EISU_SHIFT }, + { "K_EISU_TOGGLE", QFK_EISU_TOGGLE }, + { "K_KANJI_BANGOU", QFK_KANJI_BANGOU }, + { "K_ZEN_KOHO", QFK_ZEN_KOHO }, + { "K_MAE_KOHO", QFK_MAE_KOHO }, + { "M_BUTTON1", QFM_BUTTON1 }, { "M_BUTTON2", QFM_BUTTON2 }, { "M_BUTTON3", QFM_BUTTON3 },