mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-13 07:48:30 +00:00
feat: set keyboard layout system-wide when setting it in preferences
This commit is contained in:
parent
e6cb3979f1
commit
2436d6978c
1 changed files with 7 additions and 1 deletions
|
|
@ -57,6 +57,7 @@ struct DevicePrefs {
|
|||
up: Manager,
|
||||
modals: modals::Modals,
|
||||
gam: gam::Gam,
|
||||
kbd: keyboard::Keyboard,
|
||||
}
|
||||
|
||||
impl PrefHandler for DevicePrefs {
|
||||
|
|
@ -105,6 +106,7 @@ impl DevicePrefs {
|
|||
up: Manager::new(),
|
||||
modals: modals::Modals::new(&xns).unwrap(),
|
||||
gam: gam::Gam::new(&xns).unwrap(),
|
||||
kbd: keyboard::Keyboard::new(&xns).unwrap(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -254,7 +256,11 @@ impl DevicePrefs {
|
|||
|
||||
let new_result = mappings[new_result.as_str()];
|
||||
|
||||
Ok(self.up.set_keyboard_layout(new_result)?)
|
||||
self.up.set_keyboard_layout(new_result)?;
|
||||
|
||||
self.kbd.set_keymap(keyboard::KeyMap::from(new_result)).unwrap();
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue