core: button: update supported keys on startup
This commit is contained in:
parent
619b0232b5
commit
8f7e9dfe7a
1 changed files with 2 additions and 1 deletions
|
|
@ -160,10 +160,11 @@ const ANGLE_PARTS: [[usize; 4]; 16] = [
|
||||||
const NO_PRESS: Option<Press> = None;
|
const NO_PRESS: Option<Press> = None;
|
||||||
|
|
||||||
impl<D: Display, K: Keyboard> Button<D, K> {
|
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>
|
gfx: Arc<Mutex<Graphics<D>>>) -> Button<D, K>
|
||||||
{
|
{
|
||||||
kbd.change_layout(&layout);
|
kbd.change_layout(&layout);
|
||||||
|
layout.update_keys_supported(&kbd);
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
layout,
|
layout,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue