[SOLVED] MOC keymap: Home/End/PgUp/PgDn not working

Forum rules
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

[SOLVED] MOC keymap: Home/End/PgUp/PgDn not working

Unread post by rhowaldt » Sat Jul 06, 2013 12:09 pm

i am trying to get MOC to listen to me when i press PgDn (PageDown) on my laptop numpad. the keymap is configured correctly, like so:

Code: Select all

menu_down =		DOWN
menu_up =		UP
menu_page_down =	PAGE_DOWN
menu_page_up =		PAGE_UP
menu_first_item = 	HOME
menu_last_item =	END
however, all of these (on my numpad) do not work. numlock on/off doesn't change a thing. i can simply browse through my files with the up-arrow and down-arrow keys, but not through this. as you can imagine with lots of files, you might want some PageUp/PageDown-action, which i am now sorely missing.

xev is reporting the following (duplicate - keyup/keydown - entries removed for bloatlessness):

Code: Select all


KeyRelease event, serial 46, synthetic NO, window 0x1600001,
    root 0x14e, subw 0x0, time 6665333, (403,67), root:(954,384),
    state 0x0, keycode 79 (keysym 0xff95, KP_Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 46, synthetic NO, window 0x1600001,
    root 0x14e, subw 0x0, time 6665673, (403,67), root:(954,384),
    state 0x0, keycode 80 (keysym 0xff97, KP_Up), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 46, synthetic NO, window 0x1600001,
    root 0x14e, subw 0x0, time 6665936, (403,67), root:(954,384),
    state 0x0, keycode 81 (keysym 0xff9a, KP_Prior), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 46, synthetic NO, window 0x1600001,
    root 0x14e, subw 0x0, time 6666253, (403,67), root:(954,384),
    state 0x0, keycode 83 (keysym 0xff96, KP_Left), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 46, synthetic NO, window 0x1600001,
    root 0x14e, subw 0x0, time 6666500, (403,67), root:(954,384),
    state 0x0, keycode 84 (keysym 0xff9d, KP_Begin), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 46, synthetic NO, window 0x1600001,
    root 0x14e, subw 0x0, time 6666766, (403,67), root:(954,384),
    state 0x0, keycode 85 (keysym 0xff98, KP_Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 46, synthetic NO, window 0x1600001,
    root 0x14e, subw 0x0, time 6667056, (403,67), root:(954,384),
    state 0x0, keycode 87 (keysym 0xff9c, KP_End), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 46, synthetic NO, window 0x1600001,
    root 0x14e, subw 0x0, time 6667293, (403,67), root:(954,384),
    state 0x0, keycode 88 (keysym 0xff99, KP_Down), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 46, synthetic NO, window 0x1600001,
    root 0x14e, subw 0x0, time 6667604, (403,67), root:(954,384),
    state 0x0, keycode 89 (keysym 0xff9b, KP_Next), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
have used the Google of course, but not much luck (or i would've fixed it by now!)... is there anybody out there with some ideas on this? if you need more info just ask.
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: MOC keymap: Home/End/PgUp/PgDn not working

Unread post by pidsley » Sat Jul 06, 2013 3:30 pm

Create a file (I called mine "~/.newmap"). Put this in the file:

Code: Select all

keycode  79 = Home KP_7 Home KP_7
keycode  80 = Up KP_8 Up KP_8
keycode  81 = Prior KP_9 Prior KP_9
keycode  87 = End KP_1 End KP_1
keycode  88 = Down KP_2 Down KP_2
keycode  89 = Next KP_3 Next KP_3
Save the file, and run

Code: Select all

xmodmap ~/.newmap
Try mocp now.

This works for me with mocp and a few other programs I tried (and it only works in X), but I have not fully tested it with every other program you might run, so something else might break.

If it works, you can add the xmodmap call to your .xinitrc so it runs every time you start X.

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: MOC keymap: Home/End/PgUp/PgDn not working

Unread post by rhowaldt » Mon Jul 08, 2013 9:19 am

thanks Pidsley, i figured it had to be something like this, but had never done this before so had no clue where to start looking for the info... i will try this as soon as i am back at my laptop!
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: MOC keymap: Home/End/PgUp/PgDn not working

Unread post by pidsley » Mon Jul 08, 2013 1:10 pm

Let me know if it works.

Useful reading for xmodmap: https://wiki.archlinux.org/index.php/Xmodmap

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: MOC keymap: Home/End/PgUp/PgDn not working

Unread post by rhowaldt » Mon Jul 08, 2013 5:58 pm

fucking awesome man, that worked like a charm. thanks a whole lot, you're great :)
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

Post Reply