You are not logged in.

#1 2011-01-24 20:22:09

MickeyKnox
Member
Registered: 2010-02-27
Posts: 169

xmonad: mod+shift+enter does not work

xmonad does not fire up a terminal, when i press mod+shift+enter.
It never did, even before i messed with the config file.
Other mod+<key> combos work perfectly.

This is how my xmonad.hs looks like:

import XMonad
import XMonad.Layout.NoBorders
 
main = xmonad defaultConfig
        { layoutHook = smartBorders $ layoutHook defaultConfig
        , terminal = "urxvt"
        -- other fields like terminal, modMask, etc.
        }

I can however launch urxvt via dmenu pressing mod+p

Offline

#2 2011-01-25 00:10:25

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: xmonad: mod+shift+enter does not work

It's been awhile since I set up xmonad for the first time, but, if I remember right, the default setup was picky about which mod key you used.

On mine, it preferred the left hand mod key, rather than the right.  Since <mod><Shift><enter> is a pattern that can be done one handed, are you trying to use the right hand mod key?


Knute

Offline

#3 2011-01-25 01:30:43

MickeyKnox
Member
Registered: 2010-02-27
Posts: 169

Re: xmonad: mod+shift+enter does not work

Well, i did not change the mod key, so it's supposedly left alt.
Anyway, all other mod combos work, thus the mod key is recognized.
Only the particular mod+shift+enter combo does not work.

Offline

#4 2011-01-25 02:13:21

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: xmonad: mod+shift+enter does not work

Do you have, I think, xterm? installed?

If not, then it's not your key combo, it's that the executable isn't found.


Knute

Offline

#5 2011-01-25 18:56:05

MickeyKnox
Member
Registered: 2010-02-27
Posts: 169

Re: xmonad: mod+shift+enter does not work

xterm is installed, but the terminal to use urxvt, as you see above
(which is installed too, of course).

Anyway, i just made an interesting discovery: I tried another, more
recent Microsoft Keyboard, and it works!

The other keyboard i use is very, VERY old. It has a DIN Connector smile
However, i would like to continue to use the old keyboard. Just typing
this small text on this one makes me sick...

I don't know what the problem with the old one is, must be something
special with the enter key. Other 3-key combos work, like for example
mod+shift+j.

I guess, i have to configure xmonad to launch a terminal with some
other combo, like mod+F12 or so.

Thanks for your help anyway...

Offline

#6 2011-01-25 21:04:00

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: xmonad: mod+shift+enter does not work

If you want to find out the signal that the keyboard that you want to use is sending, then you can use xev.   You need to start it from a terminal window, then any keypress that you do (or mouse movement) will show up in the terminal window.

If the keyboard that you are using is sending a unique key code, then it will tell you.  Then you can use xmodmap to change the settings.

HTH


Knute

Offline

#7 2011-01-25 23:47:22

MickeyKnox
Member
Registered: 2010-02-27
Posts: 169

Re: xmonad: mod+shift+enter does not work

I ran xev with both keyboards, however, i couldn't see anything on the ouput that would explain
the different behaviour.

I pressed and released left alt, then left shift and then enter.

The oupput from xev for the old keyboard is:

KeyPress event, serial 27, synthetic NO, window 0x800001,
    root 0x135, subw 0x0, time 18045491, (311,281), root:(312,282),
    state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0x800001,
    root 0x135, subw 0x0, time 18045554, (311,281), root:(312,282),
    state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 27, synthetic NO, window 0x800001,
    root 0x135, subw 0x0, time 18048382, (311,281), root:(312,282),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0x800001,
    root 0x135, subw 0x0, time 18048461, (311,281), root:(312,282),
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 27, synthetic NO, window 0x800001,
    root 0x135, subw 0x0, time 18052627, (311,281), root:(312,282),
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
"   XmbLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0x800001,
    root 0x135, subw 0x0, time 18052698, (311,281), root:(312,282),
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

And for the new one:

KeyPress event, serial 27, synthetic NO, window 0x800001,
    root 0x135, subw 0x0, time 17819391, (143,339), root:(144,340),
    state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0x800001,
    root 0x135, subw 0x0, time 17819495, (143,339), root:(144,340),
    state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 27, synthetic NO, window 0x800001,
    root 0x135, subw 0x0, time 17827129, (143,339), root:(144,340),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0x800001,
    root 0x135, subw 0x0, time 17827252, (143,339), root:(144,340),
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 27, synthetic NO, window 0x800001,
    root 0x135, subw 0x0, time 17829015, (143,339), root:(144,340),
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
"   XmbLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0x800001,
    root 0x135, subw 0x0, time 17829110, (143,339), root:(144,340),
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

And by the way: The enter key works just fine in any other ocasion, like
executing a command in a shell.

Last edited by MickeyKnox (2011-01-26 00:00:46)

Offline

#8 2011-01-26 00:09:18

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: xmonad: mod+shift+enter does not work

Wierd.  Don't know what to tell you.  I don't use the default bindings anyway, so I'm not sure how to help you with this.

A very long time ago, I got used to the key combo of <ctrl><p> to bring up a terminal window, and it's just stuck.  (it came about when I was playing with powershell.)

So, are you absolutely tied to the default key combo to bring up your urxvt?  If not, it's probably easier to simply change it and move on.  smile


Knute

Offline

#9 2011-01-27 14:10:48

MickeyKnox
Member
Registered: 2010-02-27
Posts: 169

Re: xmonad: mod+shift+enter does not work

Well, i did some more testing with xev (sorry i couldn't report this
earlier, i was busy yesterday).

When both left_alt (mod) and left_shift are pressed, no event is fired
when hitting enter. So i guess it is really something with the keyboard.
I don't think it's broken, because everything else works just fine. I really
would like to know what the problem actually is, but who's still familiar
with this old technology? smile

The new keyboard fires an event in the scenario above of course.

And no, i'm not tied to the default key combo. I just have to find out how
to change it... But using xmonad i eventually have to immerse myself
in haskell anyway.

Last edited by MickeyKnox (2011-01-27 14:11:58)

Offline

#10 2011-01-27 15:28:37

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: xmonad: mod+shift+enter does not work

import XMonad.Util.EZConfig

main = xmonad $ defaultConfig
    { terminal = myTerminal
    , ...
    , ...
    } `additionalKeysP` myKeys


myTerminal = "urxvt"

myKeys = [ ("C-p", spawn myTerminal) ]

done from memory so apologies for mistakes.

Offline

#11 2011-01-28 01:12:00

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: xmonad: mod+shift+enter does not work

I believe that the scenerio described above is used with the ezconfig addon.

I don't use that, and mine is

    , ((controlMask,  xK_p ), spawn $ XMonad.terminal conf)

Note the comma.  The comma is a separator in haskell so you can define more than one thing in a variable  (in this case myKeys).
HTH


Knute

Offline

Board footer

Powered by FluxBB