From a58f5677155e2cf7d7bd8b5185a99687549c9764 Mon Sep 17 00:00:00 2001 From: Richard Acayan Date: Fri, 28 Mar 2025 22:27:21 -0400 Subject: [PATCH] core: layout: check if new key is supported when modifiers are updated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some modifiers update key values. If the old values are unsupported (e.g. "ยข") but the new values are supported (e.g. "c"), the keyboard should let the user press the new value. Check if the new key value is supported instead of the old one. --- src/core/layout.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/layout.rs b/src/core/layout.rs index 28ad092..78947ad 100644 --- a/src/core/layout.rs +++ b/src/core/layout.rs @@ -391,7 +391,7 @@ impl Part { val = Self::modify_shift_label(&val); } - let key_supp = kbd.key_supported(self.val.0); + let key_supp = kbd.key_supported(val.0); self.key_avail = val.0 != Keysym::NoSymbol && key_supp; self.text_avail = text_avail && Self::keyvalue_has_text(&val); self.val = val;