diff --git a/src/overlays/keyboard.rs b/src/overlays/keyboard.rs index 88a1a23..92696ed 100644 --- a/src/overlays/keyboard.rs +++ b/src/overlays/keyboard.rs @@ -57,7 +57,7 @@ fn set_modifiers(app: &mut AppState, mods: u8) { pub fn create_keyboard( app: &AppState, - keymap: Option, + mut keymap: Option, ) -> anyhow::Result> where O: Default, @@ -97,6 +97,10 @@ where let has_altgr = keymap.as_ref().map_or(false, |k| k.has_altgr()); + if !LAYOUT.auto_labels.unwrap_or(true) { + keymap = None; + } + let unit_size = size.x / LAYOUT.row_size; let h = unit_size - 2. * BUTTON_PADDING; @@ -388,6 +392,7 @@ pub struct Layout { exec_commands: HashMap>, macros: HashMap>, labels: HashMap>, + auto_labels: Option, } impl Layout {