You are not logged in.

#1 2022-07-31 00:21:32

mikl
Member
Registered: 2021-06-02
Posts: 8

Couldn't make key remaps work with Openbox menu

Couldn't make remaps work with the Openbox interface elements such as menu or window decorations.

Remap example with xmodmap:

xmodmap -e "keycode 31 = i I i I Up Up rightarrow"
xmodmap -e "keycode 44 = j J j J Left Left dead_hook"
xmodmap -e "keycode 45 = k K k K Down Down kra"
xmodmap -e "keycode 46 = l L l L Right Right lstroke"

Then if I open the Openbox menu and try to navigate the menu items with remapped key i (up), it just doesn't work, but the remap works in text editor, terminal, browser and any other app I can think of.

Also tryed <Execute><command>xdotool key Up</command></Execute> but the Openbox menu just closes when pressing AltGr+i.

When clicking the close button from a window's decoration with a key that remaps the mouse right click button, it doesn't work either.

Also tryed making the configuration directly with the X Keyboard Extension (without xmodmap). Created a file in /usr/share/X11/xkb/symbols/ and added an item to /usr/share/X11/xkb/symbols/evdev.xml, remapped Up key to i.

/usr/share/X11/xkb/symbols/es-custom

default partial alphanumeric_keys
xkb_symbols "basic" {
    name[Group1]="Spanish Custom";
    include "es(basic)"
    key <AD08> { [ i, I, Up, Up ] };
};

/usr/share/X11/xkb/symbols/evdev.xml

      <configItem>
        <name>es-custom</name>
        <shortDescription>es-custom</shortDescription>
        <description>Spanish Custom</description>
        <countryList>
          <iso3166Id>ES</iso3166Id>
        </countryList>
        <languageList>
          <iso639Id>spa</iso639Id>
        </languageList>
      </configItem>

sudo localectl set-x11-keymap es-custom pc104

reboot

The key remap works for example in text editor, but it does not work with the Openbox interface elements.

How to make this work?

Last edited by mikl (2022-07-31 16:33:16)

Offline

#2 2022-07-31 06:52:35

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,485

Re: Couldn't make key remaps work with Openbox menu

openbox might be a bit overzealous and check the key state (0x80 bitmask for AltGr) and only handle clean or numlock ones
Try the regular arrows while pressign AltGr or maybe even just Shift - in that case, remapping the arrows to "plain" keys (ie. "key <AD08> { [ Up, Up, i, I ] };" could work (on the cost of the plain key)

Offline

#3 2022-07-31 18:31:22

mikl
Member
Registered: 2021-06-02
Posts: 8

Re: Couldn't make key remaps work with Openbox menu

Your suggestion worked as you said with "plain" keys. Maybe I could somehow rebind "plain" keys only during the time the menu is active, got to try that.

Edit: now that I think, that wouldn't be ideal either, since the plain letters are also used to navigate the options by label, and it wouldn't be consistent with the keyboard layout anyway.

Last edited by mikl (2022-07-31 18:44:44)

Offline

#4 2022-07-31 21:03:59

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,485

Re: Couldn't make key remaps work with Openbox menu

The plan was mostly to guesstimate what openbox does there - you'd best raise an upstream bug about their key-state filtering.

Offline

#5 2022-08-26 01:39:22

mikl
Member
Registered: 2021-06-02
Posts: 8

Re: Couldn't make key remaps work with Openbox menu

Should I raise the bug in archlinux.org as upstream or https://bugzilla.icculus.org/buglist.cg … ct=Openbox?

Offline

#6 2022-08-26 06:08:15

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,485

Re: Couldn't make key remaps work with Openbox menu

upstream, this isn't a packaging problem - so nothing arch could do about it.

Offline

#7 2022-09-28 00:56:55

mikl
Member
Registered: 2021-06-02
Posts: 8

Re: Couldn't make key remaps work with Openbox menu

Raised a bug here https://bugzilla.icculus.org/show_bug.cgi?id=6647 following openbox.org link.

Offline

Board footer

Powered by FluxBB