tony / oxwm

Added the top row for azerty layout keyboard Browse files
Zif committed 2025-12-14 parent 35f6061 commit 2b7bda2e93a14c62e15d2480999ec2538aff3e0b
Showing 1 changed file with 31 additions and 0 deletions. UnifiedSplit
+31 −0 src/keyboard/keysyms.rs
@@ -77,6 +77,17 @@ pub const XK_PERIOD: Keysym = 0x002e;
77 pub const XK_SLASH: Keysym = 0x002f; 77 pub const XK_SLASH: Keysym = 0x002f;
78 pub const XK_PRINT: Keysym = 0xff61; 78 pub const XK_PRINT: Keysym = 0xff61;
79 79
80 +pub const XK_AMPERSAND: Keysym = 0x26;
81 +pub const XK_AGRAVE: Keysym = 0xe0;
82 +pub const XK_CCEDILLA: Keysym = 0xe7;
83 +pub const XK_EGRAVE: Keysym = 0xe8;
84 +pub const XK_EACUTE: Keysym = 0xe9;
85 +pub const XK_PARENLEFT: Keysym = 0x28;
86 +pub const XK_PARENRIGHT: Keysym = 0x29;
87 +pub const XK_QUOTEDBL: Keysym = 0x22;
88 +pub const XK_UNDERSCORE: Keysym = 0x5f;
89 +pub const XK_HYPHEN: Keysym = 0xad;
90 +
80 pub const XF86_AUDIO_RAISE_VOLUME: Keysym = 0x1008ff13; 91 pub const XF86_AUDIO_RAISE_VOLUME: Keysym = 0x1008ff13;
81 pub const XF86_AUDIO_LOWER_VOLUME: Keysym = 0x1008ff11; 92 pub const XF86_AUDIO_LOWER_VOLUME: Keysym = 0x1008ff11;
82 pub const XF86_AUDIO_MUTE: Keysym = 0x1008ff12; 93 pub const XF86_AUDIO_MUTE: Keysym = 0x1008ff12;
@@ -160,6 +171,16 @@ pub fn keysym_from_str(s: &str) -> Option<Keysym> {
160 "Period" => Some(XK_PERIOD), 171 "Period" => Some(XK_PERIOD),
161 "Slash" => Some(XK_SLASH), 172 "Slash" => Some(XK_SLASH),
162 "Print" => Some(XK_PRINT), 173 "Print" => Some(XK_PRINT),
174 + "Ampersand" => Some(XK_AMPERSAND),
175 + "Agrave" => Some(XK_AGRAVE),
176 + "Ccedilla" => Some(XK_CCEDILLA),
177 + "Egrave" => Some(XK_EGRAVE),
178 + "Eacute" => Some(XK_EACUTE),
179 + "ParenLeft" => Some(XK_PARENLEFT),
180 + "ParenRight" => Some(XK_PARENRIGHT),
181 + "QuoteDouble" => Some(XK_QUOTEDBL),
182 + "Underscore" => Some(XK_UNDERSCORE),
183 + "Hyphen" => Some(XK_HYPHEN),
163 "AudioRaiseVolume" => Some(XF86_AUDIO_RAISE_VOLUME), 184 "AudioRaiseVolume" => Some(XF86_AUDIO_RAISE_VOLUME),
164 "AudioLowerVolume" => Some(XF86_AUDIO_LOWER_VOLUME), 185 "AudioLowerVolume" => Some(XF86_AUDIO_LOWER_VOLUME),
165 "AudioMute" => Some(XF86_AUDIO_MUTE), 186 "AudioMute" => Some(XF86_AUDIO_MUTE),
@@ -210,6 +231,16 @@ pub fn format_keysym(keysym: Keysym) -> String {
210 XK_APOSTROPHE => "'".to_string(), 231 XK_APOSTROPHE => "'".to_string(),
211 XK_BACKSLASH => "\\".to_string(), 232 XK_BACKSLASH => "\\".to_string(),
212 XK_PRINT => "Print".to_string(), 233 XK_PRINT => "Print".to_string(),
234 + XK_AMPERSAND => "&".to_string(),
235 + XK_AGRAVE => "à".to_string(),
236 + XK_CCEDILLA => "ç".to_string(),
237 + XK_EGRAVE => "è".to_string(),
238 + XK_EACUTE => "é".to_string(),
239 + XK_PARENLEFT => "(".to_string(),
240 + XK_PARENRIGHT => ")".to_string(),
241 + XK_QUOTEDBL => "\"".to_string(),
242 + XK_UNDERSCORE => "_".to_string(),
243 + XK_HYPHEN => "-".to_string(),
213 XF86_AUDIO_RAISE_VOLUME => "Vol+".to_string(), 244 XF86_AUDIO_RAISE_VOLUME => "Vol+".to_string(),
214 XF86_AUDIO_LOWER_VOLUME => "Vol-".to_string(), 245 XF86_AUDIO_LOWER_VOLUME => "Vol-".to_string(),
215 XF86_AUDIO_MUTE => "Mute".to_string(), 246 XF86_AUDIO_MUTE => "Mute".to_string(),