oxwm

https://git.tonybtw.com/oxwm.git git://git.tonybtw.com/oxwm.git

Added the top row for azerty layout keyboard

Commit
2b7bda2e93a14c62e15d2480999ec2538aff3e0b
Parent
35f6061
Author
Zif <Zif>
Date
2025-12-14 22:41:54

Diff

diff --git a/src/keyboard/keysyms.rs b/src/keyboard/keysyms.rs
index 90db24b..51d613f 100644
--- a/src/keyboard/keysyms.rs
+++ b/src/keyboard/keysyms.rs
@@ -77,6 +77,17 @@ pub const XK_PERIOD: Keysym = 0x002e;
 pub const XK_SLASH: Keysym = 0x002f;
 pub const XK_PRINT: Keysym = 0xff61;
 
+pub const XK_AMPERSAND: Keysym = 0x26;
+pub const XK_AGRAVE: Keysym = 0xe0;
+pub const XK_CCEDILLA: Keysym = 0xe7;
+pub const XK_EGRAVE: Keysym = 0xe8;
+pub const XK_EACUTE: Keysym = 0xe9;
+pub const XK_PARENLEFT: Keysym = 0x28;
+pub const XK_PARENRIGHT: Keysym = 0x29;
+pub const XK_QUOTEDBL: Keysym = 0x22;
+pub const XK_UNDERSCORE: Keysym = 0x5f;
+pub const XK_HYPHEN: Keysym = 0xad;
+
 pub const XF86_AUDIO_RAISE_VOLUME: Keysym = 0x1008ff13;
 pub const XF86_AUDIO_LOWER_VOLUME: Keysym = 0x1008ff11;
 pub const XF86_AUDIO_MUTE: Keysym = 0x1008ff12;
@@ -160,6 +171,16 @@ pub fn keysym_from_str(s: &str) -> Option<Keysym> {
         "Period" => Some(XK_PERIOD),
         "Slash" => Some(XK_SLASH),
         "Print" => Some(XK_PRINT),
+        "Ampersand" => Some(XK_AMPERSAND),
+        "Agrave" => Some(XK_AGRAVE),
+        "Ccedilla" => Some(XK_CCEDILLA),
+        "Egrave" => Some(XK_EGRAVE),
+        "Eacute" => Some(XK_EACUTE),
+        "ParenLeft" => Some(XK_PARENLEFT),
+        "ParenRight" => Some(XK_PARENRIGHT),
+        "QuoteDouble" => Some(XK_QUOTEDBL),
+        "Underscore" => Some(XK_UNDERSCORE),
+        "Hyphen" => Some(XK_HYPHEN),
         "AudioRaiseVolume" => Some(XF86_AUDIO_RAISE_VOLUME),
         "AudioLowerVolume" => Some(XF86_AUDIO_LOWER_VOLUME),
         "AudioMute" => Some(XF86_AUDIO_MUTE),
@@ -210,6 +231,16 @@ pub fn format_keysym(keysym: Keysym) -> String {
         XK_APOSTROPHE => "'".to_string(),
         XK_BACKSLASH => "\\".to_string(),
         XK_PRINT => "Print".to_string(),
+        XK_AMPERSAND => "&".to_string(),
+        XK_AGRAVE => "à".to_string(),
+        XK_CCEDILLA => "ç".to_string(),
+        XK_EGRAVE => "è".to_string(),
+        XK_EACUTE => "é".to_string(),
+        XK_PARENLEFT => "(".to_string(),
+        XK_PARENRIGHT => ")".to_string(),
+        XK_QUOTEDBL => "\"".to_string(),
+        XK_UNDERSCORE => "_".to_string(),
+        XK_HYPHEN => "-".to_string(),
         XF86_AUDIO_RAISE_VOLUME => "Vol+".to_string(),
         XF86_AUDIO_LOWER_VOLUME => "Vol-".to_string(),
         XF86_AUDIO_MUTE => "Mute".to_string(),