mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-12-13 00:13:23 +00:00
en-keycodes: make it work with grp:caps_toggle
This commit is contained in:
parent
e240c8bf84
commit
e4130ff865
@ -6,6 +6,6 @@ Always use the English keymap to get keycodes, so key bindings work even when us
|
|||||||
- [v0.7](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/en-keycodes/en-keycodes.patch)
|
- [v0.7](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/en-keycodes/en-keycodes.patch)
|
||||||
|
|
||||||
### Authors
|
### Authors
|
||||||
- [ForzCross](https://codeberg.org/ForzCross)
|
|
||||||
- [Nikita Ivanov](https://codeberg.org/nikitaivanov) ([GitHub](https://github.com/NikitaIvanovV))
|
- [Nikita Ivanov](https://codeberg.org/nikitaivanov) ([GitHub](https://github.com/NikitaIvanovV))
|
||||||
|
- [ForzCross](https://codeberg.org/ForzCross)
|
||||||
- [dimkr](https://codeberg.org/dimkr) (<dima@dimakrasner.com>)
|
- [dimkr](https://codeberg.org/dimkr) (<dima@dimakrasner.com>)
|
||||||
|
|||||||
@ -1,21 +1,21 @@
|
|||||||
From cd61fac9cb6e9d0172e2f7a01e6a514d676ba5f0 Mon Sep 17 00:00:00 2001
|
From 556e47f7ce7f729ecc1b285ece0c82744741c81c Mon Sep 17 00:00:00 2001
|
||||||
From: Nikita Ivanov <nikita.vyach.ivanov@gmail.com>
|
From: Nikita Ivanov <nikita.vyach.ivanov@gmail.com>
|
||||||
Date: Tue, 4 Feb 2025 23:53:11 +0100
|
Date: Sun, 30 Nov 2025 23:16:53 +0100
|
||||||
Subject: [PATCH] Always use the English keymap to get keycodes
|
Subject: [PATCH] Always use the English keymap to get keycodes
|
||||||
|
|
||||||
---
|
---
|
||||||
dwl.c | 23 +++++++++++++++++++----
|
dwl.c | 25 +++++++++++++++++++++----
|
||||||
1 file changed, 19 insertions(+), 4 deletions(-)
|
1 file changed, 21 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
diff --git a/dwl.c b/dwl.c
|
diff --git a/dwl.c b/dwl.c
|
||||||
index def2562..c299365 100644
|
index def2562..31e98ca 100644
|
||||||
--- a/dwl.c
|
--- a/dwl.c
|
||||||
+++ b/dwl.c
|
+++ b/dwl.c
|
||||||
@@ -413,6 +413,11 @@ static struct wlr_box sgeom;
|
@@ -413,6 +413,11 @@ static struct wlr_box sgeom;
|
||||||
static struct wl_list mons;
|
static struct wl_list mons;
|
||||||
static Monitor *selmon;
|
static Monitor *selmon;
|
||||||
|
|
||||||
+static const struct xkb_rule_names en_rules = {.layout = "us"};
|
+static struct xkb_rule_names en_rules;
|
||||||
+static struct xkb_context *en_context;
|
+static struct xkb_context *en_context;
|
||||||
+static struct xkb_keymap *en_keymap;
|
+static struct xkb_keymap *en_keymap;
|
||||||
+static struct xkb_state *en_state;
|
+static struct xkb_state *en_state;
|
||||||
@ -57,11 +57,13 @@ index def2562..c299365 100644
|
|||||||
|
|
||||||
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
||||||
|
|
||||||
@@ -2607,6 +2618,10 @@ setup(void)
|
@@ -2607,6 +2618,12 @@ setup(void)
|
||||||
* pointer, touch, and drawing tablet device. We also rig up a listener to
|
* pointer, touch, and drawing tablet device. We also rig up a listener to
|
||||||
* let us know when new input devices are available on the backend.
|
* let us know when new input devices are available on the backend.
|
||||||
*/
|
*/
|
||||||
+ en_context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
|
+ en_context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
|
||||||
|
+ en_rules = xkb_rules;
|
||||||
|
+ en_rules.layout = "us";
|
||||||
+ en_keymap = xkb_keymap_new_from_names(en_context, &en_rules,
|
+ en_keymap = xkb_keymap_new_from_names(en_context, &en_rules,
|
||||||
+ XKB_KEYMAP_COMPILE_NO_FLAGS);
|
+ XKB_KEYMAP_COMPILE_NO_FLAGS);
|
||||||
+ en_state = xkb_state_new(en_keymap);
|
+ en_state = xkb_state_new(en_keymap);
|
||||||
@ -69,5 +71,5 @@ index def2562..c299365 100644
|
|||||||
virtual_keyboard_mgr = wlr_virtual_keyboard_manager_v1_create(dpy);
|
virtual_keyboard_mgr = wlr_virtual_keyboard_manager_v1_create(dpy);
|
||||||
LISTEN_STATIC(&virtual_keyboard_mgr->events.new_virtual_keyboard, virtualkeyboard);
|
LISTEN_STATIC(&virtual_keyboard_mgr->events.new_virtual_keyboard, virtualkeyboard);
|
||||||
--
|
--
|
||||||
2.48.1
|
2.51.2
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user