Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong key behaviour using ABNT2 keyboard on OpenBSD #2554

Open
cavemachine opened this issue Dec 31, 2024 · 7 comments
Open

Wrong key behaviour using ABNT2 keyboard on OpenBSD #2554

cavemachine opened this issue Dec 31, 2024 · 7 comments
Labels

Comments

@cavemachine
Copy link

Describe the bug
When using a keyboard model br ABNT2 the key "/" next to right shift don't output the character "/" but instead it makes the opened windows to circle between normal and maximized state.

To Reproduce
Steps to reproduce the behaviour:

  1. Configure wayfire.ini with
    [input] xkb_layout = br xkb_variant = abnt2
  2. Start wayfire with startwayfire.sh script
  3. Open some terminal windows
  4. Press "/" key to notice the behavior

Expected behavior
Just send out the "/" character to the screen instead of change the state of the windows

Screenshots or stacktrace
using 'xev' program I got those initial messages after pressing the "/" key:
`
PropertyNotify event, serial 34, synthetic NO, window 0x1a00001,
atom 0x117 (WM_STATE), time 15052219, state PropertyNewValue

PropertyNotify event, serial 34, synthetic NO, window 0x1a00001,
atom 0x108 (_NET_WM_STATE), time 15052219, state PropertyNewValue

PropertyNotify event, serial 34, synthetic NO, window 0x1a00001,
atom 0x108 (_NET_WM_STATE), time 15052220, state PropertyNewValue

FocusOut event, serial 34, synthetic NO, window 0x1a00001,
mode NotifyNormal, detail NotifyNonlinear

PropertyNotify event, serial 34, synthetic NO, window 0x1a00001,
atom 0x117 (WM_STATE), time 15052221, state PropertyNewValue

PropertyNotify event, serial 34, synthetic NO, window 0x1a00001,
atom 0x108 (_NET_WM_STATE), time 15052221, state PropertyNewValue

ClientMessage event, serial 34, synthetic YES, window 0x1a00001,
message_type 0xff (WM_PROTOCOLS), format 32, message 0x10b (WM_TAKE_FOCUS)

FocusIn event, serial 34, synthetic NO, window 0x1a00001,
mode NotifyNormal, detail NotifyNonlinear

KeymapNotify event, serial 34, synthetic NO, window 0x0,
keys: 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 `

Wayfire version
0.9.0

@soreau
Copy link
Member

soreau commented Jan 1, 2025

Can you try wev instead of xev? There's also libinput debug-events and evtest.

@cavemachine
Copy link
Author

Can you try wev instead of xev? There's also libinput debug-events and evtest.

Sure, here is the output of wev:
(I also pressed the "." and ";" before the "/" to show the difference)

[14: wl_keyboard] key: serial: 289; time: 548606997; key: 60; state: 1 (pressed)
sym: period (46), utf8: '.'
[14: wl_keyboard] key: serial: 290; time: 548607061; key: 60; state: 0 (released)
sym: period (46), utf8: ''
[14: wl_keyboard] key: serial: 291; time: 548607781; key: 61; state: 1 (pressed)
sym: semicolon (59), utf8: ';'
[14: wl_keyboard] key: serial: 292; time: 548607845; key: 61; state: 0 (released)
sym: semicolon (59), utf8: ''
[14: wl_keyboard] leave: serial: 293; surface: 3
[10: xdg_toplevel] configure: width: 1366; height: 768
maximized activated tiled-left tiled-right tiled-top tiled-bottom
[09: xdg_surface] configure: serial: 295
[10: xdg_toplevel] configure: width: 1366; height: 768
maximized fullscreen activated tiled-left tiled-right tiled-top tiled-bottom
[09: xdg_surface] configure: serial: 296
[13: wl_pointer] enter: serial: 297; surface: 3, x, y: 477.000000, 538.000000
[13: wl_pointer] frame
[14: wl_keyboard] enter: serial: 298; surface: 3
[14: wl_keyboard] modifiers: serial: 299; group: 0
depressed: 00000000
latched: 00000000
locked: 00000000
[11: wl_data_device] selection: (cleared)
[14: wl_keyboard] leave: serial: 300; surface: 3
[13: wl_pointer] leave: surface: 3
[13: wl_pointer] frame
[10: xdg_toplevel] configure: width: 1366; height: 768
maximized tiled-left tiled-right tiled-top tiled-bottom
[09: xdg_surface] configure: serial: 302

@soreau
Copy link
Member

soreau commented Jan 1, 2025

Does it make a difference if you disable the wm-actions plugin? It seems to me that you have '/' bound to toggle maximize, and wm-actions is a plugin that provides this feature.

@soreau
Copy link
Member

soreau commented Jan 1, 2025

There is also simple-tile plugin which has a toggle binding.. it might be useful to start with a basic set of plugins such as autostart move resize and see if it still happens. Re-enable the plugins that you need, until the problem happens. Much of wayfire functionality is provided by plugins, so finding which option is bound to this action would be useful in solving the problem.

@cavemachine
Copy link
Author

Thanks, I'm pretty new on wayfire, I just copy-pasted the default wayfire.ini and edited the keyboard section. When I remove wm-actions it stopped the windows from changing states, it just briefly gray out the window while I press the key.
On wev I got just this now:

[11: wl_data_device] selection: (cleared)
[14: wl_keyboard] leave: serial: 396; surface: 3
[14: wl_keyboard] enter: serial: 399; surface: 3
[14: wl_keyboard] modifiers: serial: 400; group: 0
depressed: 00000000
latched: 00000000
locked: 00000000

and when I remove everything but autostart move resize nothing happens at all when I press the key:
(typed ';' before '/' again)

[14: wl_keyboard] key: serial: 1187; time: 585329573; key: 61; state: 0 (released)
sym: semicolon (59), utf8: ''
[14: wl_keyboard] key: serial: 1188; time: 585329901; key: 8; state: 1 (pressed)
sym: NoSymbol (0), utf8: ''

@cavemachine
Copy link
Author

Just find one solution. I tried Sway and just had the same problem with the '/' key. Solved it by editing in /usr/X11R6/share/X11/xkb/keycodes/evdev , line 152: <AB11> = 97 ; //backslash/underscore to <AB11> = 8 ;. But no luck on Wayfire, so I tried removing the plugins one by one as you said, and had to remove 3 plugins: cube idle wm-actions . Now the '/' works!
I also have to keep the modification on the evdev file for it to work.
I will try to run Wayfire on Arch linux later, to see if it's just a especific issue on OpenBSD (or *BSDs).
Thanks!

@soreau
Copy link
Member

soreau commented Jan 1, 2025

Sounds like a pretty obscure bug, but glad you figured it out. 👍 Leaving this open for now, because I'm not sure if this is something we want to try and fix or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants