Skip to content

Commit

Permalink
修复keycode和keysym映射
Browse files Browse the repository at this point in the history
keycode映射:输入Unicode时,占位的keycode,不能用abcd这样常用的。

keysym映射:删除小键盘按键到普通按键的映射
  • Loading branch information
ewt45 committed Mar 20, 2024
1 parent 45731e4 commit 2b9b64b
Showing 1 changed file with 42 additions and 42 deletions.
84 changes: 42 additions & 42 deletions app/src/main/cpp/lorie/InputXKB.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
extern DeviceIntPtr lorieKeyboard;

static const KeyCode fakeKeys[] = {
30, 31, 32, 33, 34, 35
92, 147, 148, 149
};

static KeySym pressedKeys[256] = {0};
Expand All @@ -60,47 +60,47 @@ static KeySym pressedKeys[256] = {0};
static struct altKeysym_t {
KeySym a, b;
} altKeysym[] = {
{ XK_Shift_L, XK_Shift_R },
{ XK_Control_L, XK_Control_R },
{ XK_Meta_L, XK_Meta_R },
{ XK_Alt_L, XK_Alt_R },
{ XK_Super_L, XK_Super_R },
{ XK_Hyper_L, XK_Hyper_R },
{ XK_KP_Space, XK_space },
{ XK_KP_Tab, XK_Tab },
{ XK_KP_Enter, XK_Return },
{ XK_KP_F1, XK_F1 },
{ XK_KP_F2, XK_F2 },
{ XK_KP_F3, XK_F3 },
{ XK_KP_F4, XK_F4 },
{ XK_KP_Home, XK_Home },
{ XK_KP_Left, XK_Left },
{ XK_KP_Up, XK_Up },
{ XK_KP_Right, XK_Right },
{ XK_KP_Down, XK_Down },
{ XK_KP_Page_Up, XK_Page_Up },
{ XK_KP_Page_Down, XK_Page_Down },
{ XK_KP_End, XK_End },
{ XK_KP_Begin, XK_Begin },
{ XK_KP_Insert, XK_Insert },
{ XK_KP_Delete, XK_Delete },
{ XK_KP_Equal, XK_equal },
{ XK_KP_Multiply, XK_asterisk },
{ XK_KP_Add, XK_plus },
{ XK_KP_Separator, XK_comma },
{ XK_KP_Subtract, XK_minus },
{ XK_KP_Decimal, XK_period },
{ XK_KP_Divide, XK_slash },
{ XK_KP_0, XK_0 },
{ XK_KP_1, XK_1 },
{ XK_KP_2, XK_2 },
{ XK_KP_3, XK_3 },
{ XK_KP_4, XK_4 },
{ XK_KP_5, XK_5 },
{ XK_KP_6, XK_6 },
{ XK_KP_7, XK_7 },
{ XK_KP_8, XK_8 },
{ XK_KP_9, XK_9 },
// { XK_Shift_L, XK_Shift_R },
// { XK_Control_L, XK_Control_R },
// { XK_Meta_L, XK_Meta_R },
// { XK_Alt_L, XK_Alt_R },
// { XK_Super_L, XK_Super_R },
// { XK_Hyper_L, XK_Hyper_R },
// { XK_KP_Space, XK_space },
// { XK_KP_Tab, XK_Tab },
// { XK_KP_Enter, XK_Return },
// { XK_KP_F1, XK_F1 },
// { XK_KP_F2, XK_F2 },
// { XK_KP_F3, XK_F3 },
// { XK_KP_F4, XK_F4 },
// { XK_KP_Home, XK_Home },
// { XK_KP_Left, XK_Left },
// { XK_KP_Up, XK_Up },
// { XK_KP_Right, XK_Right },
// { XK_KP_Down, XK_Down },
// { XK_KP_Page_Up, XK_Page_Up },
// { XK_KP_Page_Down, XK_Page_Down },
// { XK_KP_End, XK_End },
// { XK_KP_Begin, XK_Begin },
// { XK_KP_Insert, XK_Insert },
// { XK_KP_Delete, XK_Delete },
// { XK_KP_Equal, XK_equal },
// { XK_KP_Multiply, XK_asterisk },
// { XK_KP_Add, XK_plus },
// { XK_KP_Separator, XK_comma },
// { XK_KP_Subtract, XK_minus },
// { XK_KP_Decimal, XK_period },
// { XK_KP_Divide, XK_slash },
// { XK_KP_0, XK_0 },
// { XK_KP_1, XK_1 },
// { XK_KP_2, XK_2 },
// { XK_KP_3, XK_3 },
// { XK_KP_4, XK_4 },
// { XK_KP_5, XK_5 },
// { XK_KP_6, XK_6 },
// { XK_KP_7, XK_7 },
// { XK_KP_8, XK_8 },
// { XK_KP_9, XK_9 },
{ XK_ISO_Level3_Shift, XK_Mode_switch },
};

Expand Down

0 comments on commit 2b9b64b

Please sign in to comment.