From 03b6d4509bbfe359878255ac77ae4863ba6a16c6 Mon Sep 17 00:00:00 2001 From: Richard Acayan Date: Thu, 31 Oct 2024 18:38:18 -0400 Subject: [PATCH] core: button: add switch_greekmath functionality --- src/core/button.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/button.rs b/src/core/button.rs index 7343c75..bbd44f4 100644 --- a/src/core/button.rs +++ b/src/core/button.rs @@ -488,7 +488,8 @@ impl Button { 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 Button { let old_height = self.layout.height(); match sym { + Keysym::Scroll_Lock => { + self.layout.switch_greekmath(); + }, Keysym::Num_Lock => { self.layout.switch_numeric(); },