0

I bought new laptop that doesn't have Home and End keys. I need both keys when I type code in Vim.

I installed Debian with the i3WM desktop environment on my laptop. I remapped my keyboard using the xmodmap command to replace Pause/Break and PrtScn with Home and End.

This works perfectly, but I want a new language in my keyboard. I use setxkbmap to set up two layouts: US and IR.

Here is my i3 configuration:

#language
exec "setxkbmap -layout us, ir"
exec "setxkbmap -option 'grp:alt_shift_toggle'"

#remap keyboard
exec xmodmap ~/.Xmodmap

When I restart my computer, I can change my keyboard language with alt+shift but Pause/Break and PrtScn are not mapped to Home and End.

I run the command xmodmap ~/.Xmodmap in my terminal. This works fine but doesn't change my keyboard layout.

How can I fix it so that I can use both?

1 Answer 1

1

Solved my problem.

First I comment all commands:

#language
#exec "setxkbmap -layout us, ir"
#exec "setxkbmap -option 'grp:alt_shift_toggle'"

#remap keyboard
#exec xmodmap ~/.Xmodmap

Then add this command:

exec_always "/home/milad/.Xmodmap"

What is .Xmodmap file? This is a shell script. Content .Xmodmap:

xmodmap -e "keycode 127 = Home";
xmodmap -e "keycode 107 = End";
xmodmap -e "keycode 223 = Prior";
xmodmap -e "keycode 158 = Next";

Now Work fine in any way!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .