tony / oxwm

Updated XF86 keys to camel case, and also added a whole lot more of 'em. Fixed removed binds. Browse files
Aaron Bush committed 2025-12-15 parent 8351ba0 commit f2ae0552392538248fcc411db5b65f56a955264f
Showing 1 changed file with 30 additions and 2 deletions. UnifiedSplit
+30 −2 src/keyboard/keysyms.rs
@@ -76,7 +76,16 @@ pub const XK_COMMA: Keysym = 0x002c;
76 76 pub const XK_PERIOD: Keysym = 0x002e;
77 77 pub const XK_SLASH: Keysym = 0x002f;
78 78 pub const XK_PRINT: Keysym = 0xff61;
79 -
79 +pub const XK_AMPERSAND: Keysym = 0x26;
80 +pub const XK_AGRAVE: Keysym = 0xe0;
81 +pub const XK_CCEDILLA: Keysym = 0xe7;
82 +pub const XK_EGRAVE: Keysym = 0xe8;
83 +pub const XK_EACUTE: Keysym = 0xe9;
84 +pub const XK_PARENLEFT: Keysym = 0x28;
85 +pub const XK_PARENRIGHT: Keysym = 0x29;
86 +pub const XK_QUOTEDBL: Keysym = 0x22;
87 +pub const XK_UNDERSCORE: Keysym = 0x5f;
88 +pub const XK_HYPHEN: Keysym = 0xad;
80 89 pub const XF86_AUDIO_MEDIA: Keysym = 0x1008ff32;
81 90 pub const XF86_AUDIO_NEXT: Keysym = 0x1008ff17;
82 91 pub const XF86_AUDIO_PAUSE: Keysym = 0x1008ff31;
@@ -214,7 +223,16 @@ pub fn keysym_from_str(s: &str) -> Option<Keysym> {
214 223 "Period" => Some(XK_PERIOD),
215 224 "Slash" => Some(XK_SLASH),
216 225 "Print" => Some(XK_PRINT),
217 -
226 + "Ampersand" => Some(XK_AMPERSAND),
227 + "Agrave" => Some(XK_AGRAVE),
228 + "Ccedilla" => Some(XK_CCEDILLA),
229 + "Egrave" => Some(XK_EGRAVE),
230 + "Eacute" => Some(XK_EACUTE),
231 + "ParenLeft" => Some(XK_PARENLEFT),
232 + "ParenRight" => Some(XK_PARENRIGHT),
233 + "QuoteDouble" => Some(XK_QUOTEDBL),
234 + "Underscore" => Some(XK_UNDERSCORE),
235 + "Hyphen" => Some(XK_HYPHEN),
218 236 "XF86AudioMedia" => Some(XF86_AUDIO_MEDIA),
219 237 "XF86AudioNext" => Some(XF86_AUDIO_NEXT),
220 238 "XF86AudioPause" => Some(XF86_AUDIO_PAUSE),
@@ -319,6 +337,16 @@ pub fn format_keysym(keysym: Keysym) -> String {
319 337 XK_APOSTROPHE => "'".to_string(),
320 338 XK_BACKSLASH => "\\".to_string(),
321 339 XK_PRINT => "Print".to_string(),
340 + XK_AMPERSAND => "&".to_string(),
341 + XK_AGRAVE => "à".to_string(),
342 + XK_CCEDILLA => "ç".to_string(),
343 + XK_EGRAVE => "è".to_string(),
344 + XK_EACUTE => "é".to_string(),
345 + XK_PARENLEFT => "(".to_string(),
346 + XK_PARENRIGHT => ")".to_string(),
347 + XK_QUOTEDBL => "\"".to_string(),
348 + XK_UNDERSCORE => "_".to_string(),
349 + XK_HYPHEN => "-".to_string(),
322 350 XF86_AUDIO_MEDIA => "Media".to_string(),
323 351 XF86_AUDIO_NEXT => "Next".to_string(),
324 352 XF86_AUDIO_PAUSE => "Pause".to_string(),