You are not logged in.

#1 2012-11-15 11:07:16

MFserver
Member
From: Sweden
Registered: 2011-10-28
Posts: 46
Website

difference between showkey and xmodmap?

My problem: I run "showkey" as root in a terminal, press the audio mute button, the volume down button, volume up, and microphone mute button, in that order. I get the keycodes:

113
114
115
248

However, when I run xmodmap -pke, I get the following:

keycode 108 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keycode 109 = Linefeed NoSymbol Linefeed
keycode 110 = Home NoSymbol Home
keycode 111 = Up NoSymbol Up
keycode 112 = Prior NoSymbol Prior
keycode 113 = Left NoSymbol Left
keycode 114 = Right NoSymbol Right
keycode 115 = End NoSymbol End
keycode 116 = Down NoSymbol Down
keycode 117 = Next NoSymbol Next
keycode 118 = Insert NoSymbol Insert

I noticed this behaviour when I used xmodmap to remap the volume controls, and then my left and right arrow keys stopped working. How come there are different keysyms in X, compared to tty? xev is not helpful, since my audio controls just show up as unmapped, and no keycode is shown.

Also, I run xmonad automatically on tty login as outlined in the wiki. My .bash_profile and .xinitrc:

#
# ~/.bash_profile
#

[[ -f ~/.bashrc ]] && . ~/.bashrc
# Start X on login
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx
#!/bin/sh
# ~/.xinitrc
#

userresources=$HOME/.Xresources
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
        for f in /etc/X11/xinit/xinitrc.d/* ; do
                [ -x "$f" ] && . "$f"
        done
        unset f
fi
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"

# Keymap, xmodmap, and enable trackpoint scrolling
setxkbmap -layout se
/usr/bin/xmodmap $HOME/.xmodmap
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 8 1
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 8 2
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 8 200
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Axes" 8 6 7 4 5

# Mouse cursor set
xsetroot -cursor_name left_ptr

# Calibrate monitor
xcalib /usr/share/color/icc/LVDS.icc

# Start my private DE's programs
stalonetray &
nm-applet&
conky &
unagi &
dropboxd &
nitrogen --restore &

# Finally, start xmonad
xmonad

Last edited by MFserver (2012-11-15 11:15:58)


Sometimes, when I'm trying to get any audio software or hardware working with my system, I wonder why I ditched Windows. But every time I work at a windows computer, I remember it again.

Offline

Board footer

Powered by FluxBB