core: layout: make meta key and layout switchers always pressable
This commit is contained in:
parent
a58f567715
commit
d751e01b21
1 changed files with 11 additions and 1 deletions
|
|
@ -284,6 +284,8 @@ impl Part {
|
||||||
KeyValue(Keysym::XF86_Fn, _) => false,
|
KeyValue(Keysym::XF86_Fn, _) => false,
|
||||||
|
|
||||||
KeyValue(Keysym::Scroll_Lock, _) => false,
|
KeyValue(Keysym::Scroll_Lock, _) => false,
|
||||||
|
KeyValue(Keysym::Num_Lock, _) => false,
|
||||||
|
KeyValue(Keysym::Caps_Lock, _) => false,
|
||||||
|
|
||||||
KeyValue(_, l) => l != "",
|
KeyValue(_, l) => l != "",
|
||||||
}
|
}
|
||||||
|
|
@ -359,7 +361,15 @@ impl Part {
|
||||||
|
|
||||||
pub fn pressable(&self) -> bool
|
pub fn pressable(&self) -> bool
|
||||||
{
|
{
|
||||||
self.text_avail || self.key_avail
|
match self.val.0 {
|
||||||
|
Keysym::Scroll_Lock => true,
|
||||||
|
Keysym::Num_Lock => true,
|
||||||
|
Keysym::Caps_Lock => true,
|
||||||
|
|
||||||
|
Keysym::Meta_L => true,
|
||||||
|
|
||||||
|
_ => self.text_avail || self.key_avail,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn modifier_id(&self) -> usize
|
pub fn modifier_id(&self) -> usize
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue