You are not logged in.

#1 2009-02-06 05:17:25

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Curious key binding issue with Openbox

I'm learning about setting up key bindings for actions in Openbox. One of things that I wanted to do is to have the root-menu and client-list-combined-menu set to keyboard shortcuts. This part I borrowed from a post in the forums and it does exactly what it's supposed to do:

<!-- Keybindings for root menus -->
    <keybind key="W-z">
      <action name="ShowMenu">
        <menu>client-list-combined-menu</menu>
      </action>
    </keybind>
    <keybind key="W-x">
      <action name="ShowMenu">
        <menu>root-menu</menu>
      </action>
    </keybind>

The issue comes when I don't want to select something in the menu. Esc will clear it just like it should. But, The Caps Lock key on my system which is remapped to Esc won't. It works like an escape key everywhere except here. Any ideas on why?

Offline

#2 2009-02-06 20:41:49

Square
Member
Registered: 2008-06-11
Posts: 435

Re: Curious key binding issue with Openbox

This is also true for me, but I've never investigated the issue. It hasn't bothered me, since I can still just reach up and hit Esc.
So, confirmed issue is all I can say neutral


 

Offline

#3 2009-02-06 21:00:32

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Curious key binding issue with Openbox

Square wrote:

This is also true for me, but I've never investigated the issue. It hasn't bothered me, since I can still just reach up and hit Esc.
So, confirmed issue is all I can say neutral

It's not a huge issue, but the deeper I get into Vim, the less everything else works properly anymore. smile I'm curious more than anything now.

Offline

#4 2009-02-06 21:15:31

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Curious key binding issue with Openbox

skottish wrote:
Square wrote:

This is also true for me, but I've never investigated the issue. It hasn't bothered me, since I can still just reach up and hit Esc.
So, confirmed issue is all I can say neutral

It's not a huge issue, but the deeper I get into Vim, the less everything else works properly anymore. smile I'm curious more than anything now.

Does this happen only in the vim window ?
Like you say its probably because the Esc key is used in vi to get out of insert mode which is interfering with the Esc for getting rid of the menu(openbox shortcut).

Last edited by Inxsible (2009-02-06 21:16:14)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#5 2009-02-06 21:25:00

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Curious key binding issue with Openbox

Inxsible wrote:

Does this happen only in the vim window ? ...

No, it happens all the time. It can be the first thing that I do when the computer boots, and it still doesn't work the way that I'd expect.

If it helps, this is what xev is reporting for Escape:

KeyPress event, serial 35, synthetic NO, window 0x1200001,
    root 0x13b, subw 0x0, time 23124448, (89,89), root:(1163,782),
    state 0x10, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
    XLookupString gives 1 bytes: (1b) "
    XmbLookupString gives 1 bytes: (1b) "
    XFilterEvent returns: False

KeyRelease event, serial 35, synthetic NO, window 0x1200001,
    root 0x13b, subw 0x0, time 23124600, (89,89), root:(1163,782),
    state 0x10, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
    XLookupString gives 1 bytes: (1b) "
    XFilterEvent returns: False

And for Caps_Lock:

KeyPress event, serial 35, synthetic NO, window 0x1200001,
    root 0x13b, subw 0x0, time 23132024, (89,89), root:(1163,782),
    state 0x10, keycode 66 (keysym 0xff1b, Escape), same_screen YES,
    XKeysymToKeycode returns keycode: 9
    XLookupString gives 1 bytes: (1b) "
    XmbLookupString gives 1 bytes: (1b) "
    XFilterEvent returns: False

KeyRelease event, serial 35, synthetic NO, window 0x1200001,
    root 0x13b, subw 0x0, time 23132144, (89,89), root:(1163,782),
    state 0x10, keycode 66 (keysym 0xff1b, Escape), same_screen YES,
    XKeysymToKeycode returns keycode: 9
    XLookupString gives 1 bytes: (1b) "
    XFilterEvent returns: False

Offline

#6 2009-02-06 21:30:20

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Curious key binding issue with Openbox

skottish wrote:
Inxsible wrote:

Does this happen only in the vim window ? ...

No, it happens all the time. It can be the first thing that I do when the computer boots, and it still doesn't work the way that I'd expect.

Oh ok... when you mentioned vim in your earlier post....I associated the two (wrongly) ...

Your mappings look fine to me. sorry couldn't be more help. Quick question...your Esc key works the way you want, but the caps (which is remapped to Esc doesn't correct?)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#7 2009-02-06 21:34:00

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Curious key binding issue with Openbox

Inxsible wrote:

Your mappings look fine to me. sorry couldn't be more help. Quick question...your Esc key works the way you want, but the caps (which is remapped to Esc doesn't correct?)

Yes, and the only place I haven't seen it work properly is in this instance. On the other hand, I don't use escape a whole lot outside of Vim, so maybe it really isn't working the way that I think it is.

--EDIT--

I can confirm that the mapping works properly in GTK2 apps, as well as in ncurses based apps. This pretty much covers everything. It's only openbox that's not getting this.

Offline

#8 2009-02-07 00:53:53

Square
Member
Registered: 2008-06-11
Posts: 435

Re: Curious key binding issue with Openbox

Perhaps it has to do with the way openbox handles keypresses?
The only lines that seem to differ in the xev outputs is the fact that caps_lock still returns keycode 66 with a symlink to keycode 9, while escape returns the actual keycode 9.
Consider taking your question upstream, and then report back if you do smile


 

Offline

#9 2009-02-07 01:32:43

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Curious key binding issue with Openbox

Square wrote:

Perhaps it has to do with the way openbox handles keypresses?
The only lines that seem to differ in the xev outputs is the fact that caps_lock still returns keycode 66 with a symlink to keycode 9, while escape returns the actual keycode 9.
Consider taking your question upstream, and then report back if you do smile

Since this community couldn't see the problem, and it's a good idea:

http://bugzilla.icculus.org/show_bug.cgi?id=3958

Offline

#10 2009-02-07 02:47:35

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Curious key binding issue with Openbox

The answer:

Mikachu wrote:

If you were to make your escape key not have the Escape keysym, then the
rebound caps lock would work in openbox. On the one hand, it shouldn't be too
hard to make openbox bind all keys with a given keysym, on the other hand it is
very unusual to have the same key in two places.

Offline

Board footer

Powered by FluxBB