xmodmap doesn't work in .xinitrc(but in a xterm all woks fine)
by knarh from LinuxQuestions.org on (#6PPGR)
Hello, I've swithced caps_lock to a Hyper key in xorg.conf.d/00-keyboard.conf. The Hyper key is assigned to a Mod4, I want it as a Mod3 key, because Mod4 is my Super key(windows key).
I'm using xmodmap, but it doesn't work in .xinitrc, but in terminal emulator all works fine. Any suggests why?
With 777 permissions on .Xmomap doen't work either.
distro: antix-23-64bit with 5.10 kernel(sysvinit)
00-keyboard.conf:
Code:Section "InputClass"
Identifier "Keyboard Defaults"
MatchIsKeyboard "yes"
Option "XkbModel" "pc104"
Option "XkbLayout" "us,ch"
Option "XkbOptions" "grp:alt_shift_toggle,terminate:ctrl_alt_bksp,caps:hyper"
EndSection~/.Xmodmap:
Code:clear mod3
remove mod4 = Hyper_L
add mod3 = Hyper_Lxmodmap -pm:
Code:xmodmap: up to 5 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Hyper_L (0x42), Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)~/.xinirc:
Code:#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb "$sysresources"
fi
if [ -f $sysmodmap ]; then
xmodmap "$sysmodmap"
fi
if [ -f "$userresources" ]; then
xrdb "$userresources"
fi
#####PART WITH XMODMAP######
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
fbsetbg -a $HOME/wallpapers/min_wall.jpg
xterm &
exec fluxbox -no-toolbar -log "$HOME/.fluxbox/log"
#exec herbstluftwm
I'm using xmodmap, but it doesn't work in .xinitrc, but in terminal emulator all works fine. Any suggests why?
With 777 permissions on .Xmomap doen't work either.
distro: antix-23-64bit with 5.10 kernel(sysvinit)
00-keyboard.conf:
Code:Section "InputClass"
Identifier "Keyboard Defaults"
MatchIsKeyboard "yes"
Option "XkbModel" "pc104"
Option "XkbLayout" "us,ch"
Option "XkbOptions" "grp:alt_shift_toggle,terminate:ctrl_alt_bksp,caps:hyper"
EndSection~/.Xmodmap:
Code:clear mod3
remove mod4 = Hyper_L
add mod3 = Hyper_Lxmodmap -pm:
Code:xmodmap: up to 5 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Hyper_L (0x42), Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)~/.xinirc:
Code:#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb "$sysresources"
fi
if [ -f $sysmodmap ]; then
xmodmap "$sysmodmap"
fi
if [ -f "$userresources" ]; then
xrdb "$userresources"
fi
#####PART WITH XMODMAP######
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
fbsetbg -a $HOME/wallpapers/min_wall.jpg
xterm &
exec fluxbox -no-toolbar -log "$HOME/.fluxbox/log"
#exec herbstluftwm