core: button: update supported keys on startup

This commit is contained in:
Richard Acayan 2024-08-04 22:07:10 -04:00
parent 619b0232b5
commit 8f7e9dfe7a

View file

@ -160,10 +160,11 @@ const ANGLE_PARTS: [[usize; 4]; 16] = [
const NO_PRESS: Option<Press> = None;
impl<D: Display, K: Keyboard> Button<D, K> {
pub fn new(layout: Layout, mut kbd: K,
pub fn new(mut layout: Layout, mut kbd: K,
gfx: Arc<Mutex<Graphics<D>>>) -> Button<D, K>
{
kbd.change_layout(&layout);
layout.update_keys_supported(&kbd);
Button {
layout,