Comments (6)
Working on it. In parallel I try to get more information on these mysterious bits in this post on the Xorg ML.
from fvwm3.
Hi @farblos
Are you switching the keyboard layout between US ans DE at any point as part of this test?
from fvwm3.
Are you switching the keyboard layout between US ans DE at any point as part of this test?
@ThomasAdam Sorry, forgot to mention that.
Yes, I switch - using the configured toggle Scroll Lock (grp:sclk_toggle
).
So more precisely the test case goes like this:
- Start Fvwm, open at least 3 windows
- M-Tab to open window list, then M-S-Tab => cycles backward in window list
- Release all keys
- Scroll Lock => group 2 active
- M-Tab to open window list, then M-S-Tab: => cycles forward in window list
- Release all keys
- Scroll Lock => group 1 active
- Repeat at step 2
Plus this does not depend on the language but on the groups: If I make DE group 1 and US group 2, the exact same test case applies.
from fvwm3.
I modified function _menu_binding_is_key
to dump binding modifiers and xkey event state as follows:
fvwm_debug(__func__,
"modifier: %d (%d), state: %d (%d)",
b->Modifier, MaskUsedModifiers(b->Modifier),
event->xkey.state, MaskUsedModifiers(event->xkey.state));
This results in the following output when a keyboard group (aka. layout) different from the default one is active and when Alt-Tabbing:
[1690037041.095430] _menu_binding_is_key: modifier: 8 (8), state: 8200 (8200)
where 8200 = 0b10000000001000.
Section Xkb State to Core Protocol State Transformation of the "The X Keyboard Extension: Library Specification" says:
Normally, the Xkb-aware server reports keyboard state in the state member of events
such as a KeyPress event and ButtonPress event, encoded as follows:
bits meaning 15 0 13-14 Group index 8-12 Pointer Buttons 0-7 Modifiers
Accordingly, when I modify MaskUsedModifiers
to hide bits 13 and 14 in addition to the unused modifiers:
unsigned int MaskUsedModifiers(unsigned int in_modifiers)
{
return in_modifiers & ~mods_unused & ~0b11000000000000;
}
the modifiers start to work in the non-default keyboard group as well. IMO the keyboard group could be savely ignored among the modifiers as far as Fvwm is concerned.
I could provide a PR if solving this is not much more difficult than that ...
from fvwm3.
Hi @farblos
Send a PR for this, please.
from fvwm3.
To my question
Is there anything better than just masking out bits 13 and 14 in
event->xkey.state as I have proposed as solution for that issue?
Is there some constant that represents these two bits?
Po Lu replied:
No, the solution is to remove those two bits. This has no negative
consequences, but make sure the bits are restored before the event's
modifier mask is provided to a keycode or keysym translation function.
Since keycode and keysym translation functions are not relevant in this particular use case (comparing modifier bits), I'll keep things simple and will indeed just remove these bits in function MaskUsedModifiers
. PR to follow soon.
from fvwm3.
Related Issues (20)
- UseSkipList doesn't work HOT 6
- ItemFormat "%5.5i%|%5.5l%5.2>%|" HOT 5
- Handle _NET_WM_STATE_SKIP_TASKBAR in _NET_WM_STATE client messages
- FvwmPager grid disappears HOT 4
- Unmaximizing a window on a different desk moves but won't map the window. HOT 3
- new window to popup close to my mouse pointer? HOT 3
- Desktop becomes unresponsive until <esc> is clicked when clicking right mouse button while holding left button on firefox tabs HOT 3
- FvwmPager does not notice virtual desktop size changes HOT 12
- Desk 0 not accessible. HOT 13
- FvwmPager (mini window) HOT 1
- FvwmPager Desk 0 shadow and unstable HOT 5
- Per-command monitor handling should have a "screen" prefix
- "GotoPage prev" should go to the previous page per desktop HOT 8
- Wayland Support When HOT 2
- Fsvg.h using deprecated calls. HOT 2
- No image and system freeze HOT 21
- mouse binding breaks Firefox HOT 6
- InfoStore: rewrite internals to use TAILQ instead of a linked list.
- FvwmMFL: FVWMMFL_SOCKET needs rethinking
- Workspace number at changes -- system freeze HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fvwm3.