keycodes: rebase against 9c05b9622c7aa3a0874c49231249cf1859e2d031

This commit is contained in:
Leonardo Hernández Hernández 2024-09-01 22:48:30 -06:00
parent 690364346d
commit c96d0ae452
No known key found for this signature in database
GPG Key ID: E538897EE11B9624
2 changed files with 563 additions and 278 deletions

View File

@ -5,7 +5,7 @@ layout (you can use the keys.h file to customize, or get the keycodes with
### Download
- [git branch](https://codeberg.org/sevz/dwl/src/branch/keycodes)
- [2024-06-07](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/keycodes/keycodes.patch)
- [main 2024-09-01](/dwl/dwl-patches/raw/branch/main/patches/keycodes/keycodes.patch)
- [keycodes-0.7.patch](/dwl/dwl-patches/raw/branch/main/patches/keycodes/keycodes-0.7.patch)
### Config after patching

View File

@ -1,4 +1,4 @@
From bf026b489f4de99030b424226a6b5877fcbc26ea Mon Sep 17 00:00:00 2001
From 477b53a171133ff7fb2144270b30dd4a86e61f0d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?=
<leohdz172@proton.me>
Date: Fri, 4 Jun 2021 16:51:01 -0500
@ -9,17 +9,17 @@ Content-Transfer-Encoding: 8bit
Signed-off-by: Leonardo Hernández Hernández <leohdz172@proton.me>
---
config.def.h | 85 +++++++++---------
dwl.c | 35 +++-----
keys.h | 242 +++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 297 insertions(+), 65 deletions(-)
config.def.h | 85 ++++-----
dwl.c | 35 ++--
keys.h | 514 +++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 569 insertions(+), 65 deletions(-)
create mode 100644 keys.h
diff --git a/config.def.h b/config.def.h
index a784eb4f..8af07495 100644
index 22d2171d..87a6e60f 100644
--- a/config.def.h
+++ b/config.def.h
@@ -106,11 +106,11 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA
@@ -109,11 +109,11 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA
/* If you want to use the windows key for MODKEY, use WLR_MODIFIER_LOGO */
#define MODKEY WLR_MODIFIER_ALT
@ -34,7 +34,7 @@ index a784eb4f..8af07495 100644
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
@@ -119,51 +119,52 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA
@@ -122,51 +122,52 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA
static const char *termcmd[] = { "foot", NULL };
static const char *menucmd[] = { "wmenu-run", NULL };
@ -127,10 +127,10 @@ index a784eb4f..8af07495 100644
static const Button buttons[] = {
diff --git a/dwl.c b/dwl.c
index 6f041a0d..ba743c6d 100644
index 9021e442..ea9d134c 100644
--- a/dwl.c
+++ b/dwl.c
@@ -143,7 +143,7 @@ typedef struct {
@@ -147,7 +147,7 @@ typedef struct {
typedef struct {
uint32_t mod;
@ -139,8 +139,8 @@ index 6f041a0d..ba743c6d 100644
void (*func)(const Arg *);
const Arg arg;
} Key;
@@ -152,9 +152,8 @@ typedef struct {
struct wl_list link;
@@ -155,9 +155,8 @@ typedef struct {
typedef struct {
struct wlr_keyboard_group *wlr_group;
- int nsyms;
@ -151,7 +151,7 @@ index 6f041a0d..ba743c6d 100644
struct wl_event_source *key_repeat_source;
struct wl_listener modifiers;
@@ -289,7 +288,7 @@ static void fullscreennotify(struct wl_listener *listener, void *data);
@@ -295,7 +294,7 @@ static void gpureset(struct wl_listener *listener, void *data);
static void handlesig(int signo);
static void incnmaster(const Arg *arg);
static void inputdevice(struct wl_listener *listener, void *data);
@ -160,7 +160,7 @@ index 6f041a0d..ba743c6d 100644
static void keypress(struct wl_listener *listener, void *data);
static void keypressmod(struct wl_listener *listener, void *data);
static int keyrepeat(void *data);
@@ -1491,7 +1490,7 @@ inputdevice(struct wl_listener *listener, void *data)
@@ -1551,7 +1550,7 @@ inputdevice(struct wl_listener *listener, void *data)
}
int
@ -169,7 +169,7 @@ index 6f041a0d..ba743c6d 100644
{
/*
* Here we handle compositor keybindings. This is when the compositor is
@@ -1501,7 +1500,7 @@ keybinding(uint32_t mods, xkb_keysym_t sym)
@@ -1561,7 +1560,7 @@ keybinding(uint32_t mods, xkb_keysym_t sym)
const Key *k;
for (k = keys; k < END(keys); k++) {
if (CLEANMASK(mods) == CLEANMASK(k->mod)
@ -178,7 +178,7 @@ index 6f041a0d..ba743c6d 100644
k->func(&k->arg);
return 1;
}
@@ -1512,17 +1511,12 @@ keybinding(uint32_t mods, xkb_keysym_t sym)
@@ -1572,17 +1571,12 @@ keybinding(uint32_t mods, xkb_keysym_t sym)
void
keypress(struct wl_listener *listener, void *data)
{
@ -196,7 +196,7 @@ index 6f041a0d..ba743c6d 100644
int handled = 0;
uint32_t mods = wlr_keyboard_get_modifiers(&group->wlr_group->keyboard);
@@ -1531,19 +1525,16 @@ keypress(struct wl_listener *listener, void *data)
@@ -1591,19 +1585,16 @@ keypress(struct wl_listener *listener, void *data)
/* On _press_ if there is no active screen locker,
* attempt to process a compositor keybinding. */
@ -220,7 +220,7 @@ index 6f041a0d..ba743c6d 100644
wl_event_source_timer_update(group->key_repeat_source, 0);
}
@@ -1573,15 +1564,13 @@ int
@@ -1633,15 +1624,13 @@ int
keyrepeat(void *data)
{
KeyboardGroup *group = data;
@ -240,14 +240,14 @@ index 6f041a0d..ba743c6d 100644
}
diff --git a/keys.h b/keys.h
new file mode 100644
index 00000000..e732f806
index 00000000..047b76b0
--- /dev/null
+++ b/keys.h
@@ -0,0 +1,242 @@
@@ -0,0 +1,514 @@
+/* You can use the macros within this file
+ * instead of search the keycodes yourself
+ * with wev or something like that
+ * Also probably you search this:
+ * You probably are also searching these:
+ * Key_XF86AudioMute
+ * Key_XF86AudioLowerVolume
+ * Key_XF86AudioRaiseVolume
@ -255,242 +255,514 @@ index 00000000..e732f806
+ * Key_XF86MonBrightnessUp
+*/
+
+#define Key_Escape 9
+#define Key_1 10
+#define Key_2 11
+#define Key_3 12
+#define Key_4 13
+#define Key_5 14
+#define Key_6 15
+#define Key_7 16
+#define Key_8 17
+#define Key_9 18
+#define Key_0 19
+#define Key_minus 20
+#define Key_equal 21
+#define Key_BackSpace 22
+#define Key_Tab 23
+#define Key_q 24
+#define Key_w 25
+#define Key_e 26
+#define Key_r 27
+#define Key_t 28
+#define Key_y 29
+#define Key_u 30
+#define Key_i 31
+#define Key_o 32
+#define Key_p 33
+#define Key_bracketleft 34
+#define Key_bracketright 35
+#define Key_Return 36
+#define Key_Control_L 37
+#define Key_a 38
+#define Key_s 39
+#define Key_d 40
+#define Key_f 41
+#define Key_g 42
+#define Key_h 43
+#define Key_j 44
+#define Key_k 45
+#define Key_l 46
+#define Key_semicolon 47
+#define Key_apostrophe 48
+#define Key_grave 49
+#define Key_Shift_L 50
+#define Key_backslash 51
+#define Key_z 52
+#define Key_x 53
+#define Key_c 54
+#define Key_v 55
+#define Key_b 56
+#define Key_n 57
+#define Key_m 58
+#define Key_comma 59
+#define Key_period 60
+#define Key_slash 61
+#define Key_Shift_R 62
+#define Key_KP_Multiply 63
+#define Key_Alt_L 64
+#define Key_space 65
+#define Key_Caps_Lock 66
+#define Key_F1 67
+#define Key_F2 68
+#define Key_F3 69
+#define Key_F4 70
+#define Key_F5 71
+#define Key_F6 72
+#define Key_F7 73
+#define Key_F8 74
+#define Key_F9 75
+#define Key_F10 76
+#define Key_Num_Lock 77
+#define Key_Scroll_Lock 78
+#define Key_KP_Home 79
+#define Key_KP_7 Key_KP_Home
+#define Key_KP_Up 80
+#define Key_KP_8 Key_KP_Up
+#define Key_KP_Prior 81
+#define Key_KP_9 Key_KP_Prior
+#define Key_KP_Subtract 82
+#define Key_KP_Left 83
+#define Key_KP_4 Key_KP_Left
+#define Key_KP_Begin 84
+#define Key_KP_5 Key_KP_Begin
+#define Key_KP_Right 85
+#define Key_KP_6 Key_KP_Right
+#define Key_KP_Add 86
+#define Key_KP_End 87
+#define Key_KP_1 Key_KP_End
+#define Key_KP_Down 88
+#define Key_KP_2 Key_KP_Down
+#define Key_KP_Next 89
+#define Key_KP_3 Key_KP_Next
+#define Key_KP_Insert 90
+#define Key_KP_0 Key_KP_Insert
+#define Key_KP_Delete 91
+#define Key_KP_Period Key_KP_Insert
+#define Key_ISO_Level3_Shift 92
+#define Key_less 94
+#define Key_F11 95
+#define Key_F12 96
+#define Key_Katakana 98
+#define Key_Hiragana 99
+#define Key_Henkan_Mode 100
+#define Key_Hiragana_Katakana 101
+#define Key_Muhenkan 102
+#define Key_KP_Enter 104
+#define Key_Control_R 105
+#define Key_KP_Divide 106
+#define Key_Print 107
+#define Key_Alt_R 108
+#define Key_Linefeed 109
+#define Key_Home 110
+#define Key_Up 111
+#define Key_Prior 112
+#define Key_Left 113
+#define Key_Right 114
+#define Key_End 115
+#define Key_Down 116
+#define Key_Next 117
+#define Key_Insert 118
+#define Key_Delete 119
+#define Key_XF86AudioMute 121
+#define Key_XF86AudioLowerVolume 122
+#define Key_XF86AudioRaiseVolume 123
+#define Key_XF86PowerOff 124
+#define Key_KP_Equal 125
+#define Key_plusminus 126
+#define Key_Pause 127
+#define Key_XF86LaunchA 128
+#define Key_KP_Decimal 129
+#define Key_Hangul 130
+#define Key_Hangul_Hanja 131
+#define Key_Super_L 133
+#define Key_Super_R 134
+#define Key_Menu 135
+#define Key_Cancel 136
+#define Key_Redo 137
+#define Key_SunProps 138
+#define Key_Undo 139
+#define Key_SunFront 140
+#define Key_XF86Copy 141
+#define Key_XF86Open 142
+#define Key_XF86Paste 143
+#define Key_Find 144
+#define Key_XF86Cut 145
+#define Key_Help 146
+#define Key_XF86MenuKB 147
+#define Key_XF86Calculator 148
+#define Key_XF86Sleep 150
+#define Key_XF86WakeUp 151
+#define Key_XF86Explorer 152
+#define Key_XF86Send 153
+#define Key_XF86Xfer 155
+#define Key_XF86Launch1 156
+#define Key_XF86Launch2 157
+#define Key_XF86WWW 158
+#define Key_XF86DOS 159
+#define Key_XF86ScreenSaver 160
+#define Key_XF86RotateWindows 161
+#define Key_XF86TaskPane 162
+#define Key_XF86Mail 163
+#define Key_XF86Favorites 164
+#define Key_XF86MyComputer 165
+#define Key_XF86Back 166
+#define Key_XF86Forward 167
+#define Key_XF86Eject1 169
+#define Key_XF86Eject2 170
+#define Key_XF86AudioNext 171
+#define Key_XF86AudioPlay 172
+#define Key_XF86AudioPrev 173
+#define Key_XF86AudioStop 174
+#define Key_XF86AudioRecord 175
+#define Key_XF86AudioRewind 176
+#define Key_XF86Phone 177
+#define Key_XF86Tools 179
+#define Key_XF86HomePage 180
+#define Key_XF86Reload 181
+#define Key_XF86Close 182
+#define Key_XF86ScrollUp 185
+#define Key_XF86ScrollDown 186
+#define Key_parenleft 187
+#define Key_parenright 188
+#define Key_XF86New 189
+#define Key_Redo2 190
+#define Key_XF86Tools2 191
+#define Key_XF86Launch5 192
+#define Key_XF86Launch6 193
+#define Key_XF86Launch7 194
+#define Key_XF86Launch8 195
+#define Key_XF86Launch9 196
+#define Key_XF86AudioMicMute 198
+#define Key_XF86TouchpadToggle 199
+#define Key_XF86TouchpadOn 200
+#define Key_XF86TouchpadOff 201
+#define Key_Mode_switch 203
+#define Key_XF86AudioPlay2 208
+#define Key_XF86AudioPause 209
+#define Key_XF86Launch3 210
+#define Key_XF86Launch4 211
+#define Key_XF86LaunchB 212
+#define Key_XF86Suspend 213
+#define Key_XF86Close2 214
+#define Key_XF86AudioPlay3 215
+#define Key_XF86AudioForward 216
+#define Key_Print2 218
+#define Key_XF86WebCam 220
+#define Key_XF86AudioPreset 221
+#define Key_XF86Mail2 223
+#define Key_XF86Messenger 224
+#define Key_XF86Search 225
+#define Key_XF86Go 226
+#define Key_XF86Finance 227
+#define Key_XF86Game 228
+#define Key_XF86Shop 229
+#define Key_Cancel2 231
+#define Key_XF86MonBrightnessDown 232
+#define Key_XF86MonBrightnessUp 233
+#define Key_XF86AudioMedia 234
+#define Key_XF86Display 235
+#define Key_XF86KbdLightOnOff 236
+#define Key_XF86KbdBrightnessDown 237
+#define Key_XF86KbdBrightnessUp 238
+#define Key_XF86Send2 239
+#define Key_XF86Reply 240
+#define Key_XF86MailForward 241
+#define Key_XF86Save 242
+#define Key_XF86Documents 243
+#define Key_XF86Battery 244
+#define Key_XF86Bluetooth 245
+#define Key_XF86WLAN 246
+#define Key_XF86MonBrightnessCycle 251
+#define Key_XF86WWAN 254
+#define Key_XF86RFKill 255
+#define Key_Escape 0x009
+#define Key_1 0x00a
+#define Key_exclam 0x00a
+#define Key_2 0x00b
+#define Key_at 0x00b
+#define Key_3 0x00c
+#define Key_numbersign 0x00c
+#define Key_4 0x00d
+#define Key_dollar 0x00d
+#define Key_5 0x00e
+#define Key_percent 0x00e
+#define Key_6 0x00f
+#define Key_asciicircum 0x00f
+#define Key_7 0x010
+#define Key_ampersand 0x010
+#define Key_8 0x011
+#define Key_asterisk 0x011
+#define Key_9 0x012
+#define Key_parenleft 0x012
+#define Key_0 0x013
+#define Key_parenright 0x013
+#define Key_minus 0x014
+#define Key_underscore 0x014
+#define Key_equal 0x015
+#define Key_plus 0x015
+#define Key_BackSpace 0x016
+#define Key_Tab 0x017
+#define Key_ISO_Left_Tab 0x017
+#define Key_q 0x018
+#define Key_Q 0x018
+#define Key_w 0x019
+#define Key_W 0x019
+#define Key_e 0x01a
+#define Key_E 0x01a
+#define Key_r 0x01b
+#define Key_R 0x01b
+#define Key_t 0x01c
+#define Key_T 0x01c
+#define Key_y 0x01d
+#define Key_Y 0x01d
+#define Key_u 0x01e
+#define Key_U 0x01e
+#define Key_i 0x01f
+#define Key_I 0x01f
+#define Key_o 0x020
+#define Key_O 0x020
+#define Key_p 0x021
+#define Key_P 0x021
+#define Key_bracketleft 0x022
+#define Key_braceleft 0x022
+#define Key_bracketright 0x023
+#define Key_braceright 0x023
+#define Key_Return 0x024
+#define Key_Control_L 0x025
+#define Key_a 0x026
+#define Key_A 0x026
+#define Key_s 0x027
+#define Key_S 0x027
+#define Key_d 0x028
+#define Key_D 0x028
+#define Key_f 0x029
+#define Key_F 0x029
+#define Key_g 0x02a
+#define Key_G 0x02a
+#define Key_h 0x02b
+#define Key_H 0x02b
+#define Key_j 0x02c
+#define Key_J 0x02c
+#define Key_k 0x02d
+#define Key_K 0x02d
+#define Key_l 0x02e
+#define Key_L 0x02e
+#define Key_semicolon 0x02f
+#define Key_colon 0x02f
+#define Key_apostrophe 0x030
+#define Key_quotedbl 0x030
+#define Key_grave 0x031
+#define Key_asciitilde 0x031
+#define Key_Shift_L 0x032
+#define Key_backslash 0x033
+#define Key_bar 0x033
+#define Key_z 0x034
+#define Key_Z 0x034
+#define Key_x 0x035
+#define Key_X 0x035
+#define Key_c 0x036
+#define Key_C 0x036
+#define Key_v 0x037
+#define Key_V 0x037
+#define Key_b 0x038
+#define Key_B 0x038
+#define Key_n 0x039
+#define Key_N 0x039
+#define Key_m 0x03a
+#define Key_M 0x03a
+#define Key_comma 0x03b
+#define Key_less 0x03b
+#define Key_period 0x03c
+#define Key_greater 0x03c
+#define Key_slash 0x03d
+#define Key_question 0x03d
+#define Key_Shift_R 0x03e
+#define Key_KP_Multiply 0x03f
+#define Key_XF86ClearGrab 0x03f
+#define Key_Alt_L 0x040
+#define Key_Meta_L 0x040
+#define Key_space 0x041
+#define Key_Caps_Lock 0x042
+#define Key_F1 0x043
+#define Key_XF86Switch_VT_1 0x043
+#define Key_F2 0x044
+#define Key_XF86Switch_VT_2 0x044
+#define Key_F3 0x045
+#define Key_XF86Switch_VT_3 0x045
+#define Key_F4 0x046
+#define Key_XF86Switch_VT_4 0x046
+#define Key_F5 0x047
+#define Key_XF86Switch_VT_5 0x047
+#define Key_F6 0x048
+#define Key_XF86Switch_VT_6 0x048
+#define Key_F7 0x049
+#define Key_XF86Switch_VT_7 0x049
+#define Key_F8 0x04a
+#define Key_XF86Switch_VT_8 0x04a
+#define Key_F9 0x04b
+#define Key_XF86Switch_VT_9 0x04b
+#define Key_F10 0x04c
+#define Key_XF86Switch_VT_10 0x04c
+#define Key_Num_Lock 0x04d
+#define Key_Scroll_Lock 0x04e
+#define Key_KP_Home 0x04f
+#define Key_KP_7 0x04f
+#define Key_KP_Up 0x050
+#define Key_KP_8 0x050
+#define Key_KP_Prior 0x051
+#define Key_KP_9 0x051
+#define Key_KP_Subtract 0x052
+#define Key_XF86Prev_VMode 0x052
+#define Key_KP_Left 0x053
+#define Key_KP_4 0x053
+#define Key_KP_Begin 0x054
+#define Key_KP_5 0x054
+#define Key_KP_Right 0x055
+#define Key_KP_6 0x055
+#define Key_KP_Add 0x056
+#define Key_XF86Next_VMode 0x056
+#define Key_KP_End 0x057
+#define Key_KP_1 0x057
+#define Key_KP_Down 0x058
+#define Key_KP_2 0x058
+#define Key_KP_Next 0x059
+#define Key_KP_3 0x059
+#define Key_KP_Insert 0x05a
+#define Key_KP_0 0x05a
+#define Key_KP_Delete 0x05b
+#define Key_KP_Decimal 0x05b
+#define Key_ISO_Level3_Shift 0x05c
+#define Key_less2 0x05e
+#define Key_greater2 0x05e
+#define Key_bar2 0x05e
+#define Key_brokenbar 0x05e
+#define Key_F11 0x05f
+#define Key_XF86Switch_VT_11 0x05f
+#define Key_F12 0x060
+#define Key_XF86Switch_VT_12 0x060
+#define Key_Katakana 0x062
+#define Key_Hiragana 0x063
+#define Key_Henkan_Mode 0x064
+#define Key_Hiragana_Katakana 0x065
+#define Key_Muhenkan 0x066
+#define Key_KP_Enter 0x068
+#define Key_Control_R 0x069
+#define Key_KP_Divide 0x06a
+#define Key_XF86Ungrab 0x06a
+#define Key_Print 0x06b
+#define Key_Sys_Req 0x06b
+#define Key_Alt_R 0x06c
+#define Key_Meta_R 0x06c
+#define Key_Linefeed 0x06d
+#define Key_Home 0x06e
+#define Key_Up 0x06f
+#define Key_Prior 0x070
+#define Key_Left 0x071
+#define Key_Right 0x072
+#define Key_End 0x073
+#define Key_Down 0x074
+#define Key_Next 0x075
+#define Key_Insert 0x076
+#define Key_Delete 0x077
+#define Key_XF86AudioMute 0x079
+#define Key_XF86AudioLowerVolume 0x07a
+#define Key_XF86AudioRaiseVolume 0x07b
+#define Key_XF86PowerOff 0x07c
+#define Key_KP_Equal 0x07d
+#define Key_plusminus 0x07e
+#define Key_Pause 0x07f
+#define Key_Break 0x07f
+#define Key_XF86LaunchA 0x080
+#define Key_KP_Decimal2 0x081
+#define Key_Hangul 0x082
+#define Key_Hangul_Hanja 0x083
+#define Key_Super_L 0x085
+#define Key_Super_R 0x086
+#define Key_Menu 0x087
+#define Key_Cancel 0x088
+#define Key_Redo 0x089
+#define Key_SunProps 0x08a
+#define Key_Undo 0x08b
+#define Key_SunFront 0x08c
+#define Key_XF86Copy 0x08d
+#define Key_XF86Open 0x08e
+#define Key_XF86Paste 0x08f
+#define Key_Find 0x090
+#define Key_XF86Cut 0x091
+#define Key_Help 0x092
+#define Key_XF86MenuKB 0x093
+#define Key_XF86Calculator 0x094
+#define Key_XF86Sleep 0x096
+#define Key_XF86WakeUp 0x097
+#define Key_XF86Explorer 0x098
+#define Key_XF86Send 0x099
+#define Key_XF86Xfer 0x09b
+#define Key_XF86Launch1 0x09c
+#define Key_XF86Launch2 0x09d
+#define Key_XF86WWW 0x09e
+#define Key_XF86DOS 0x09f
+#define Key_XF86ScreenSaver 0x0a0
+#define Key_XF86RotateWindows 0x0a1
+#define Key_XF86TaskPane 0x0a2
+#define Key_XF86Mail 0x0a3
+#define Key_XF86Favorites 0x0a4
+#define Key_XF86MyComputer 0x0a5
+#define Key_XF86Back 0x0a6
+#define Key_XF86Forward 0x0a7
+#define Key_XF86Eject 0x0a9
+#define Key_XF86Eject2 0x0aa
+#define Key_XF86AudioNext 0x0ab
+#define Key_XF86AudioPlay 0x0ac
+#define Key_XF86AudioPause 0x0ac
+#define Key_XF86AudioPrev 0x0ad
+#define Key_XF86AudioStop 0x0ae
+#define Key_XF86Eject3 0x0ae
+#define Key_XF86AudioRecord 0x0af
+#define Key_XF86AudioRewind 0x0b0
+#define Key_XF86Phone 0x0b1
+#define Key_XF86Tools 0x0b3
+#define Key_XF86HomePage 0x0b4
+#define Key_XF86Reload 0x0b5
+#define Key_XF86Close 0x0b6
+#define Key_XF86ScrollUp 0x0b9
+#define Key_XF86ScrollDown 0x0ba
+#define Key_parenleft2 0x0bb
+#define Key_parenright2 0x0bc
+#define Key_XF86New 0x0bd
+#define Key_Redo2 0x0be
+#define Key_XF86Tools2 0x0bf
+#define Key_XF86Launch5 0x0c0
+#define Key_XF86Launch6 0x0c1
+#define Key_XF86Launch7 0x0c2
+#define Key_XF86Launch8 0x0c3
+#define Key_XF86Launch9 0x0c4
+#define Key_XF86AudioMicMute 0x0c6
+#define Key_XF86TouchpadToggle 0x0c7
+#define Key_XF86TouchpadOn 0x0c8
+#define Key_XF86TouchpadOff 0x0c9
+#define Key_ISO_Level5_Shift 0x0cb
+#define Key_Alt_L2 0x0cc
+#define Key_Meta_L2 0x0cd
+#define Key_Super_L2 0x0ce
+#define Key_Hyper_L 0x0cf
+#define Key_XF86AudioPlay2 0x0d0
+#define Key_XF86AudioPause2 0x0d1
+#define Key_XF86Launch3 0x0d2
+#define Key_XF86Launch4 0x0d3
+#define Key_XF86LaunchB 0x0d4
+#define Key_XF86Suspend 0x0d5
+#define Key_XF86Close2 0x0d6
+#define Key_XF86AudioPlay3 0x0d7
+#define Key_XF86AudioForward 0x0d8
+#define Key_Print2 0x0da
+#define Key_XF86WebCam 0x0dc
+#define Key_XF86AudioPreset 0x0dd
+#define Key_XF86Mail2 0x0df
+#define Key_XF86Messenger 0x0e0
+#define Key_XF86Search 0x0e1
+#define Key_XF86Go 0x0e2
+#define Key_XF86Finance 0x0e3
+#define Key_XF86Game 0x0e4
+#define Key_XF86Shop 0x0e5
+#define Key_Cancel2 0x0e7
+#define Key_XF86MonBrightnessDown 0x0e8
+#define Key_XF86MonBrightnessUp 0x0e9
+#define Key_XF86AudioMedia 0x0ea
+#define Key_XF86Display 0x0eb
+#define Key_XF86KbdLightOnOff 0x0ec
+#define Key_XF86KbdBrightnessDown 0x0ed
+#define Key_XF86KbdBrightnessUp 0x0ee
+#define Key_XF86Send2 0x0ef
+#define Key_XF86Reply 0x0f0
+#define Key_XF86MailForward 0x0f1
+#define Key_XF86Save 0x0f2
+#define Key_XF86Documents 0x0f3
+#define Key_XF86Battery 0x0f4
+#define Key_XF86Bluetooth 0x0f5
+#define Key_XF86WLAN 0x0f6
+#define Key_XF86UWB 0x0f7
+#define Key_XF86Next_VMode2 0x0f9
+#define Key_XF86Prev_VMode2 0x0fa
+#define Key_XF86MonBrightnessCycle 0x0fb
+#define Key_XF86BrightnessAuto 0x0fc
+#define Key_XF86DisplayOff 0x0fd
+#define Key_XF86WWAN 0x0fe
+#define Key_XF86RFKill 0x0ff
+#define Key_XF86AudioMicMute2 0x100
+#define Key_XF86Info 0x16e
+#define Key_XF86Favorites2 0x174
+#define Key_XF86CycleAngle 0x17b
+#define Key_XF86FullScreen 0x17c
+#define Key_XF86Keyboard 0x17e
+#define Key_XF86AspectRatio 0x17f
+#define Key_XF86DVD 0x18d
+#define Key_XF86Audio 0x190
+#define Key_XF86Video 0x191
+#define Key_XF86Calendar 0x195
+#define Key_XF86ChannelUp 0x19a
+#define Key_XF86ChannelDown 0x19b
+#define Key_XF86AudioRandomPlay 0x1a2
+#define Key_XF86Break 0x1a3
+#define Key_XF86VideoPhone 0x1a8
+#define Key_XF86Game2 0x1a9
+#define Key_XF86ZoomIn 0x1aa
+#define Key_XF86ZoomOut 0x1ab
+#define Key_XF86ZoomReset 0x1ac
+#define Key_XF86Word 0x1ad
+#define Key_XF86Editor 0x1ae
+#define Key_XF86Excel 0x1af
+#define Key_XF86GraphicsEditor 0x1b0
+#define Key_XF86Presentation 0x1b1
+#define Key_XF86Database 0x1b2
+#define Key_XF86News 0x1b3
+#define Key_XF86Voicemail 0x1b4
+#define Key_XF86Addressbook 0x1b5
+#define Key_XF86Messenger2 0x1b6
+#define Key_XF86DisplayToggle 0x1b7
+#define Key_XF86SpellCheck 0x1b8
+#define Key_XF86LogOff 0x1b9
+#define Key_dollar2 0x1ba
+#define Key_EuroSign 0x1bb
+#define Key_XF86FrameBack 0x1bc
+#define Key_XF86FrameForward 0x1bd
+#define Key_XF86ContextMenu 0x1be
+#define Key_XF86MediaRepeat 0x1bf
+#define Key_XF8610ChannelsUp 0x1c0
+#define Key_XF8610ChannelsDown 0x1c1
+#define Key_XF86Images 0x1c2
+#define Key_XF86NotificationCenter 0x1c4
+#define Key_XF86PickupPhone 0x1c5
+#define Key_XF86HangupPhone 0x1c6
+#define Key_XF86Fn 0x1d8
+#define Key_XF86Fn_Esc 0x1d9
+#define Key_XF86FnRightShift 0x1ed
+#define Key_braille_dot_1 0x1f9
+#define Key_braille_dot_2 0x1fa
+#define Key_braille_dot_3 0x1fb
+#define Key_braille_dot_4 0x1fc
+#define Key_braille_dot_5 0x1fd
+#define Key_braille_dot_6 0x1fe
+#define Key_braille_dot_7 0x1ff
+#define Key_braille_dot_8 0x200
+#define Key_braille_dot_9 0x201
+#define Key_braille_dot_1_2 0x202
+#define Key_XF86Numeric0 0x208
+#define Key_XF86Numeric1 0x209
+#define Key_XF86Numeric2 0x20a
+#define Key_XF86Numeric3 0x20b
+#define Key_XF86Numeric4 0x20c
+#define Key_XF86Numeric5 0x20d
+#define Key_XF86Numeric6 0x20e
+#define Key_XF86Numeric7 0x20f
+#define Key_XF86Numeric8 0x210
+#define Key_XF86Numeric9 0x211
+#define Key_XF86NumericStar 0x212
+#define Key_XF86NumericPound 0x213
+#define Key_XF86NumericA 0x214
+#define Key_XF86NumericB 0x215
+#define Key_XF86NumericC 0x216
+#define Key_XF86NumericD 0x217
+#define Key_XF86CameraFocus 0x218
+#define Key_XF86WPSButton 0x219
+#define Key_XF86TouchpadToggle2 0x21a
+#define Key_XF86TouchpadOn2 0x21b
+#define Key_XF86TouchpadOff2 0x21c
+#define Key_XF86CameraZoomIn 0x21d
+#define Key_XF86CameraZoomOut 0x21e
+#define Key_XF86CameraUp 0x21f
+#define Key_XF86CameraDown 0x220
+#define Key_XF86CameraLeft 0x221
+#define Key_XF86CameraRight 0x222
+#define Key_XF86AttendantOn 0x223
+#define Key_XF86AttendantOff 0x224
+#define Key_XF86AttendantToggle 0x225
+#define Key_XF86LightsToggle 0x226
+#define Key_XF86ALSToggle 0x238
+#define Key_XF86RotationLockToggle 0x239
+#define Key_XF86Buttonconfig 0x248
+#define Key_XF86Taskmanager 0x249
+#define Key_XF86Journal 0x24a
+#define Key_XF86ControlPanel 0x24b
+#define Key_XF86AppSelect 0x24c
+#define Key_XF86Screensaver 0x24d
+#define Key_XF86VoiceCommand 0x24e
+#define Key_XF86Assistant 0x24f
+#define Key_ISO_Next_Group 0x250
+#define Key_XF86EmojiPicker 0x251
+#define Key_XF86Dictate 0x252
+#define Key_XF86CameraAccessEnable 0x253
+#define Key_XF86CameraAccessDisable 0x254
+#define Key_XF86CameraAccessToggle 0x255
+#define Key_XF86BrightnessMin 0x258
+#define Key_XF86BrightnessMax 0x259
+#define Key_XF86KbdInputAssistPrev 0x268
+#define Key_XF86KbdInputAssistNext 0x269
+#define Key_XF86KbdInputAssistPrevgroup 0x26a
+#define Key_XF86KbdInputAssistNextgroup 0x26b
+#define Key_XF86KbdInputAssistAccept 0x26c
+#define Key_XF86KbdInputAssistCancel 0x26d
+#define Key_XF86RightUp 0x26e
+#define Key_XF86RightDown 0x26f
+#define Key_XF86LeftUp 0x270
+#define Key_XF86LeftDown 0x271
+#define Key_XF86RootMenu 0x272
+#define Key_XF86MediaTopMenu 0x273
+#define Key_XF86Numeric11 0x274
+#define Key_XF86Numeric12 0x275
+#define Key_XF86AudioDesc 0x276
+#define Key_XF863DMode 0x277
+#define Key_XF86NextFavorite 0x278
+#define Key_XF86StopRecord 0x279
+#define Key_XF86PauseRecord 0x27a
+#define Key_XF86VOD 0x27b
+#define Key_XF86Unmute 0x27c
+#define Key_XF86FastReverse 0x27d
+#define Key_XF86SlowReverse 0x27e
+#define Key_XF86Data 0x27f
+#define Key_XF86OnScreenKeyboard 0x280
+#define Key_XF86PrivacyScreenToggle 0x281
+#define Key_XF86SelectiveScreenshot 0x282
+#define Key_XF86NextElement 0x283
+#define Key_XF86PreviousElement 0x284
+#define Key_XF86AutopilotEngageToggle 0x285
+#define Key_XF86MarkWaypoint 0x286
+#define Key_XF86Sos 0x287
+#define Key_XF86NavChart 0x288
+#define Key_XF86FishingChart 0x289
+#define Key_XF86SingleRangeRadar 0x28a
+#define Key_XF86DualRangeRadar 0x28b
+#define Key_XF86RadarOverlay 0x28c
+#define Key_XF86TraditionalSonar 0x28d
+#define Key_XF86ClearvuSonar 0x28e
+#define Key_XF86SidevuSonar 0x28f
+#define Key_XF86NavInfo 0x290
+#define Key_XF86BrightnessAdjust 0x291
+#define Key_XF86Macro1 0x298
+#define Key_XF86Macro2 0x299
+#define Key_XF86Macro3 0x29a
+#define Key_XF86Macro4 0x29b
+#define Key_XF86Macro5 0x29c
+#define Key_XF86Macro6 0x29d
+#define Key_XF86Macro7 0x29e
+#define Key_XF86Macro8 0x29f
+#define Key_XF86Macro9 0x2a0
+#define Key_XF86Macro10 0x2a1
+#define Key_XF86Macro11 0x2a2
+#define Key_XF86Macro12 0x2a3
+#define Key_XF86Macro13 0x2a4
+#define Key_XF86Macro14 0x2a5
+#define Key_XF86Macro15 0x2a6
+#define Key_XF86Macro16 0x2a7
+#define Key_XF86Macro17 0x2a8
+#define Key_XF86Macro18 0x2a9
+#define Key_XF86Macro19 0x2aa
+#define Key_XF86Macro20 0x2ab
+#define Key_XF86Macro21 0x2ac
+#define Key_XF86Macro22 0x2ad
+#define Key_XF86Macro23 0x2ae
+#define Key_XF86Macro24 0x2af
+#define Key_XF86Macro25 0x2b0
+#define Key_XF86Macro26 0x2b1
+#define Key_XF86Macro27 0x2b2
+#define Key_XF86Macro28 0x2b3
+#define Key_XF86Macro29 0x2b4
+#define Key_XF86Macro30 0x2b5
+#define Key_XF86MacroRecordStart 0x2b8
+#define Key_XF86MacroRecordStop 0x2b9
+#define Key_XF86MacroPresetCycle 0x2ba
+#define Key_XF86MacroPreset1 0x2bb
+#define Key_XF86MacroPreset2 0x2bc
+#define Key_XF86MacroPreset3 0x2bd
+#define Key_XF86KbdLcdMenu1 0x2c0
+#define Key_XF86KbdLcdMenu2 0x2c1
+#define Key_XF86KbdLcdMenu3 0x2c2
+#define Key_XF86KbdLcdMenu4 0x2c3
+#define Key_XF86KbdLcdMenu5 0x2c4
--
2.45.2
2.46.0
From 0498877c2bc6fd08b15fcefb9599e27728617e7b Mon Sep 17 00:00:00 2001
From c4cd9dae5d38ebbb96231da2afa85652444163df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?=
<leohdz172@proton.me>
Date: Sun, 19 Mar 2023 15:50:07 -0600
@ -501,18 +773,18 @@ Content-Transfer-Encoding: 8bit
Signed-off-by: Leonardo Hernández Hernández <leohdz172@proton.me>
---
generate-keys.c | 82 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 82 insertions(+)
generate-keys.c | 95 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 95 insertions(+)
create mode 100644 generate-keys.c
diff --git a/generate-keys.c b/generate-keys.c
new file mode 100644
index 00000000..83458fb7
index 00000000..37655611
--- /dev/null
+++ b/generate-keys.c
@@ -0,0 +1,82 @@
@@ -0,0 +1,95 @@
+/******************************************************************
+ * Copyright 2023 Leonardo Hernández Hernández
+ * Copyright 2023-2024 Leonardo Hernández Hernández
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the “Software”), to
@ -535,64 +807,77 @@ index 00000000..83458fb7
+
+/* cc -lxkbcommon -o generate-keys generate-keys.c */
+
+#define _DEFAULT_SOURCE
+
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <inttypes.h>
+#include <unistd.h>
+
+#include <xkbcommon/xkbcommon.h>
+
+int
+main(void)
+{
+ struct xkb_context *context;
+ /* Allow generate keys with a different layout and variant.
+ * You can also use XKB_DEFAULT_* environmental variables and let this as is */
+ struct xkb_rule_names rules = {
+ 0
+ };
+ struct xkb_keymap *keymap;
+ struct xkb_state *state;
+ struct xkb_context *context = NULL;
+ struct xkb_keymap *keymap = NULL;
+ xkb_keycode_t keycode, min_keycode, max_keycode;
+ xkb_layout_index_t layout, num_layouts;
+ xkb_level_index_t level, num_levels;
+ int i, nsyms;
+ const xkb_keysym_t *syms;
+ char keyname[64];
+ FILE *f = fopen("keys.h", "w");
+ if (!f) {
+ bool ok = false;
+ FILE *file = fopen("keys.h", "w");
+ if (!file) {
+ perror("Couldn't open keys.h");
+ return EXIT_FAILURE;
+ }
+
+ if (!(context = xkb_context_new(XKB_CONTEXT_NO_FLAGS))) {
+ fputs("Couldn't create xkbcommon context\n", stderr);
+ return EXIT_FAILURE;
+ goto out;
+ }
+
+ if (!(keymap = xkb_keymap_new_from_names(context, &rules,
+ XKB_KEYMAP_COMPILE_NO_FLAGS))) {
+ fputs("Couldn't create xkbcommon keymap\n", stderr);
+ return EXIT_FAILURE;
+ }
+
+ if (!(state = xkb_state_new(keymap))) {
+ fputs("Couldn't create xkbcommon state\n", stderr);
+ return EXIT_FAILURE;
+ goto out;
+ }
+
+ min_keycode = xkb_keymap_min_keycode(keymap);
+ max_keycode = xkb_keymap_max_keycode(keymap);
+
+ for (keycode = min_keycode; keycode <= max_keycode; keycode++) {
+ nsyms = xkb_state_key_get_syms(state, keycode, &syms);
+ for (i = 0; i < nsyms; i++) {
+ xkb_keysym_get_name(syms[i], keyname, sizeof(keyname) / sizeof(keyname[0]));
+ fprintf(f, "#define Key_%-24s %d\n", keyname, keycode);
+ num_layouts = xkb_keymap_num_layouts_for_key(keymap, keycode);
+ for (layout = 0; layout < num_layouts; layout++) {
+ num_levels = xkb_keymap_num_levels_for_key(keymap, keycode, layout);
+ for (level = 0; level < num_levels; level++) {
+ nsyms = xkb_keymap_key_get_syms_by_level(keymap, keycode, layout, level, &syms);
+ for (i = 0; i < nsyms; i++) {
+ xkb_keysym_get_name(syms[i], keyname, sizeof(keyname) / sizeof(keyname[0]));
+ fprintf(file, "#define Key_%-27s %#05"PRIx32"\n", keyname, keycode);
+ }
+ }
+ }
+ }
+
+ xkb_state_unref(state);
+ ok = true;
+ sync();
+
+out:
+ fclose(file);
+ xkb_keymap_unref(keymap);
+ xkb_context_unref(context);
+ return !ok;
+}
--
2.45.2
2.46.0