core: layout: make meta key and layout switchers always pressable

This commit is contained in:
Richard Acayan 2025-04-01 20:17:00 -04:00
parent a58f567715
commit d751e01b21
No known key found for this signature in database
GPG key ID: 0346F4894879DB73

View file

@ -284,6 +284,8 @@ impl Part {
KeyValue(Keysym::XF86_Fn, _) => false,
KeyValue(Keysym::Scroll_Lock, _) => false,
KeyValue(Keysym::Num_Lock, _) => false,
KeyValue(Keysym::Caps_Lock, _) => false,
KeyValue(_, l) => l != "",
}
@ -359,7 +361,15 @@ impl Part {
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