core: button: add switch_greekmath functionality
This commit is contained in:
parent
92983bcc99
commit
03b6d4509b
1 changed files with 5 additions and 1 deletions
|
|
@ -488,7 +488,8 @@ impl<D: Display, K: Keyboard> Button<D, K> {
|
|||
let meta_pressed = modifiers[MOD_META - 1] != ModState::Released;
|
||||
let mods_pressed = ctrl_pressed || alt_pressed || meta_pressed;
|
||||
|
||||
if part.sym() == Keysym::Num_Lock
|
||||
if part.sym() == Keysym::Scroll_Lock
|
||||
|| part.sym() == Keysym::Num_Lock
|
||||
|| part.sym() == Keysym::Caps_Lock {
|
||||
return;
|
||||
}
|
||||
|
|
@ -510,6 +511,9 @@ impl<D: Display, K: Keyboard> Button<D, K> {
|
|||
let old_height = self.layout.height();
|
||||
|
||||
match sym {
|
||||
Keysym::Scroll_Lock => {
|
||||
self.layout.switch_greekmath();
|
||||
},
|
||||
Keysym::Num_Lock => {
|
||||
self.layout.switch_numeric();
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue