wayland: keyboard: skip adding unavailable keys to the keymap
Keys are unsupported if they have no name, or if xkeysym uses a different format for their name (e.g. XF86Fn). Skip key symbols that have no name and can't be added to the text keymap. To support this, set the availability of each keysym before updating the keymap.
This commit is contained in:
parent
79fa68e990
commit
ba9137d1f1
2 changed files with 2 additions and 2 deletions
|
|
@ -169,8 +169,8 @@ impl<D: Display, K: Keyboard> Button<D, K> {
|
||||||
mut layout: Layout, mut kbd: K,
|
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);
|
|
||||||
layout.update_keys_supported(&kbd);
|
layout.update_keys_supported(&kbd);
|
||||||
|
kbd.change_layout(&layout);
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
layout,
|
layout,
|
||||||
|
|
|
||||||
|
|
@ -225,7 +225,7 @@ impl Keyboard for VirtualKeyboard {
|
||||||
for row in layout.rows() {
|
for row in layout.rows() {
|
||||||
for key in row {
|
for key in row {
|
||||||
for part in &key.parts {
|
for part in &key.parts {
|
||||||
if part.sym() == Keysym::NoSymbol || part.sym() == Keysym::XF86_Fn {
|
if !part.key_available() {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue