Skip to content

Feat/keyboard/fr azerty#200

Open
nattensleplubo wants to merge 3 commits into
masterfrom
feat/keyboard/fr-azerty
Open

Feat/keyboard/fr azerty#200
nattensleplubo wants to merge 3 commits into
masterfrom
feat/keyboard/fr-azerty

Conversation

@nattensleplubo

Copy link
Copy Markdown
Collaborator

Adding support to azerty keyboard.
Switch to azerty layout using the command "azerty" or to qwerty using "qwerty".
Default layout is qwerty.

@nattensleplubo nattensleplubo added the enhancement New feature or request label Jun 18, 2026
@@ -0,0 +1,696 @@
use super::{Keymap, KeymapSet, KeymapValue};
use crate::driver::keyboard::ScanCodeValue;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


pub const FR_AZERTY_KEYMAP: Keymap = {
let mut keymap = [None; 0x80];
// Letters --------------------------------------------------------------

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: no need for that comment.

pub const FR_AZERTY_KEYMAP: Keymap = {
let mut keymap = [None; 0x80];
// Letters --------------------------------------------------------------
keymap[ScanCodeValue::Q as usize] = Some(KeymapSet {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: use the same order as in the us_qwerty.rs file

ScanCodeValue::A, then ScanCodeValue::B, etc.

alt_shift: KeymapValue::Alt('W'),
ctrl: KeymapValue::Control('W'),
});
// Number row (digits require Shift; accents fall back to ASCII) ---------

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: no need for that comment.

ctrl: KeymapValue::Control('@'),
});
keymap[ScanCodeValue::Two as usize] = Some(KeymapSet {
// é

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: no need for that comment.

ctrl: KeymapValue::Control('\\'),
});
keymap[ScanCodeValue::SingleQuote as usize] = Some(KeymapSet {
// ù -> ASCII fallback 'u'

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: no need for that comment.

ctrl: KeymapValue::Control('@'),
});
keymap[ScanCodeValue::Slash as usize] = Some(KeymapSet {
// § shifted -> ASCII fallback '!'

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: no need for that comment.

alt_shift: KeymapValue::Alt('?'),
ctrl: KeymapValue::Control('@'),
});
// ² key had no ASCII equivalent so its disabled for now.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: no need for that comment.

Comment thread src/driver/shell/mod.rs
Comment on lines +67 to +68
\tazerty\n\
\tqwerty"

@alisterd51 alisterd51 Jun 23, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (blocking): have a single command such as set_layout [LAYOUT] to manage an arbitrary number of layouts

Comment thread src/driver/shell/mod.rs
},
"azerty" => {
KEYBOARD.lock().set_azerty();
println!("Keyboard layout set to AZERTY (fr)");

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: no need for print (except perhaps in case of an error)

@alisterd51 alisterd51 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (blocking): for a simple feature like this, only a single atomic commit is allowed.

Rebase to get a single commit.
Rename the PR so it matches the commit.

alt1: KeymapValue::Alt('a'),
alt2: KeymapValue::Alt('a'),
alt_shift: KeymapValue::Alt('A'),
ctrl: KeymapValue::Control('A'),

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question (blocking): this does not match MINIX's Ctrl key behavior (https://github.com/Stichting-MINIX-Research-Foundation/minix/blob/master/minix/drivers/tty/tty/keymaps/french.src#L21C5-L21C65); are you sure about this implementation?

@alisterd51 alisterd51 linked an issue Jun 23, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add AZERTY layout

2 participants