Questions tagged [xmodmap]

xmodmap is a tool for manipulating keymaps and pointer button mappings in the Xorg environment.

61 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
696 views

how to remap super keys?

I'm playing around with keyboard settings, and wanted to remap my windows keys to tab, for convenience. So I tried (133 is the left super key on my keyboard) xmodmap -e "keycode 133 = Tab Super_L" ...
4
votes
1answer
475 views

Xkbmap overwriting Xmodmap

I use Xmodmap to remap some of my keys. I want to use Xkbmap to have a keyboard shortcut to switch keyboard layouts. When I run setxkbmap us, my keyboard layout changes but my Xmodmap changes get lost....
4
votes
0answers
794 views

Missing KeyPress event

I got new thinkpad and it's missing a ContextMenu key and has PrintScreen key where ContextMenu should have been. I remapped it using xmodmap. The problem is, the key is missing KeyPress events, only ...
4
votes
0answers
136 views

Mode_switch + Shift not the same as Shift + Mode_Switch?

I've this in my ~/.Xmodmap: keycode 47 = Mode_switch NoSymbol Mode_switch keycode 25 = w W backslash bar Shift+Mode_switch+W produces bar, which is what's intended. However Mode_switch+Shift+W ...
3
votes
0answers
190 views

setxkbmap conflicting with xmodmap

So initially I had the following in my ~/.Xmodmap which mapped CapsLock+HJKL to left/down/up/right like in vim: keycode 66 = Mode_switch keysym h = h H Left keysym j = j J Down keysym k = k K Up ...
3
votes
0answers
191 views

read .Xmodmap on login in Cinnamon

I am running Linux Mint 17 and want Cinnamon to read from my .Xmodmap on start. Seems that ~/.Xmodmap is not being read by default. How do I do that?
3
votes
0answers
768 views

Can I xmodmap only a specific keyboard?

I'd like to swap some keys but only in external keyboard. Is this possible with xmodmap? I've found this question: Can I Xmodmap only a specific device? but it refers only to mouse. I found here ...
3
votes
0answers
116 views

Make Compose not compose after certain key presses

On my laptop, I use the Win as a modifier. With the Fn key pressed, the key sends a different keysym and I use that as a Compose key. keycode 133 = Hyper_L keycode 134 = Multi_key add mod4 = Hyper_L ...
2
votes
0answers
27 views

Remap keys including a modifier

I use an alternative german keyboard layout on Ubuntu 18.04: ~$ setxkbmap de koy Now I want to swap three keys (Mod3 → f → ß → Mod3) as shown in that picture: This are the keycodes for these keys: ...
2
votes
0answers
180 views

Turning the Escape key into a modifier that still acts as Escape when tapped

I use a tiling window manager (xMonad at the moment), and due to this I need a key that acts as the ‘control key’ for window management. Whenever I use a keyboard with Windows/Super/Mod4 keys, I use ...
2
votes
0answers
341 views

Mapping key using xmodmap changes multiple keys

I am running Ubuntu server 16.04. Not sure if this matters, but I am forwarding the screen to a browser using XPRA. All works reasonably well except for a few pesky key combinations. I am using a GB ...
2
votes
0answers
155 views

Modify only one keyboard layer in .xmodmap

My default keyboard layout looks like this $ xmodkeymap -pke ... keycode 38 = a A a A ae AE ae AE a A ae AE ... I want to modify the part of the layout where mode_switch is pressed, that is, ...
2
votes
0answers
82 views

xmodmap and modifier

I wanted to remap Ctrl-N/Ctrl-P to Up and Down keys. And I found this post and did something like this: ! add Mode_switch keycode 66 = NoSymbol NoSymbol keycode 66 = Mode_switch keycode 57 = n N ...
2
votes
0answers
462 views

Karabiner like features with xmodmap

Karabiner for OS X has a few features that I would like to get in Fedora. You can hold Tab and use h and l to switch between the running apps (Tab basically works as a modifier) You can hold s and ...
2
votes
0answers
163 views

Map ctrl+key different from typing key in xkb or xmodmap

Is it possible to map ctrl+key different from regular typing key in linux? I have done it in windows with MSKLC but can't figure out how to do it in linux. E.g. I want to type dvorak but have regular ...
2
votes
0answers
329 views

Global vim-like (hjkl) navigation with numlock & xmodmap?

I'd like to be able mimic vim's hjkl navigation everywhere in the system by utilizing num lock (or scroll lock), and making hjkl keys act as arrows whenever num lock is on, and regular behavior ...
2
votes
0answers
85 views

Why does Caps Lock key behave as Caps Lock key without the Lock modifier?

At first, there is no key mapping. The Caps Lock key on my keyboard behaves as Caps Lock. lone@debian:~$ xmodmap -pke | grep Caps_Lock keycode 66 = Caps_Lock NoSymbol Caps_Lock lone@debian:~$ ...
2
votes
0answers
303 views

Remap key to two modifers or use meta shortcuts in terminal (terminator)

Background: Running Arch Linux on KDE. KDE shortcuts have a problem with being saved past reboot so i'm using xmodmap and xbindkeys. So I am using xmodmap. Right now caps lock is mapped to meta (...
2
votes
0answers
812 views

xkbmap remap PrtScr and Insert Keys to Home and Escape

I've been fumbling with xkbmap for a while, and I can't figure out how to remap the Print Screen button to Home. It's as if the us keymap just doesn't mention the PRSC key code at all. I can't use ...
2
votes
0answers
858 views

OpenSUSE - Apple Wireless Keyboard - Switch “fn” and “ctrl” key?

I'm trying to configure the Apple Keyboard so that the "fn" key and the "ctrl" key are swapped. So far I swapped the "cmd" and "alt" key, the "°" and "<" key using xmodmap. Information for that can ...
2
votes
1answer
4k views

xfce swap command and control keys

What is the equivalent of this in Debian XFCE?: Go into System -> Preferences -> Keyboard Click on the "Layouts" tab and then click the "Layout Options" button. Click on "Alt/Win key ...
1
vote
1answer
35 views

Bind CapsLock+hjkl to arrow keys

I want to bind CapsLock + hjkl to arrow keys, I found two way that each have some issues: Solution 1 Using xkb : Edit /usr/share/X11/xkb/symbols/us first block. # replace Caps with ...
1
vote
0answers
124 views

xmodmap lost after sleep

In Ubuntu 18.04 I use the following autostart script: [Desktop Entry] Type=Application Exec=/home/user/.xinitrc Version=1.0 X-GNOME-Autostart-enabled=true Name=xmodmap Comment=xmodmap script which ...
1
vote
0answers
64 views

Change Scan Code of Keys

In Windows I use sharpkeys to remap keys. On Mac I use Karabiner Elements to remap keys. Is there a preferably built in way to remap keys based on scan code? The advantage of this is that VirtualBox,...
1
vote
0answers
166 views

xmodmap: Super modifier negates Mode_switch modifier when pressed together

Running Manjaro with i3wm. I mapped my Caps key to Mode_switch modifier with xmodmap. I am using it to turn WASD into arrow keys, and a few other combinations. Pressing Caps+W/A/S/D works as ...
1
vote
1answer
51 views

xmodmap: remapped Control_L not working for copying and pasting

After spending hours, I found that xmodmap can be used to remap / key to Left Control key. I used following command: $ xmodmap -e "keycode 94 = Control_L NoSymbol Control_L" Using xev, I find that ...
1
vote
0answers
99 views

Why Tab can't be modified with ISO_Level3_Shift

I am using a 40 key keyboard called daisy, I want to have a consistent layout of all my keyboards. The tab can't modified to other keys is kind a waste of resources. The relevant part in .Xmodmap is: ...
1
vote
0answers
398 views

How to alter level 3 meaning of keys with XKB

I had a neat little hack to get German "Umlaute" on a US ANSI keyboard with XModap. When I hold Caps-Lock, I get Umlaute in the places where they are on a German keyboard. Here my .Xmodmap file ...
1
vote
0answers
73 views

Fully remap a key to work as right alt

I'm using Linux Mint 18.3. My keyboard has a nonsensical key setup where I have an extra \ key right before the right alt, and I keep using it by mistake. Since I don't need the \ key there at all, I ...
1
vote
0answers
47 views

How can I remap Ctrl_Left + button to one action, and Ctrl_Right + button to another?

In my particular example, I want to be able to remap Control_left + n to output LeftArrow, but also to Control_right + n to output Return. How can I do that? I red through xmodmap man, so as xbinkeys, ...
1
vote
1answer
172 views

xmodmap Remap Left Mouse to Right Mouse

What I've tried: xmodmap -e "pointer = 3 2 3" xmodmap -e "LeftMouse = RightMouse" What am I doing wrong?
1
vote
0answers
467 views

Remapping Caps Lock to left control, and left control to Super key using xmodmap

I've been checking out other questions regarding xmodmap, but couldn't find a solution to my situation. I got an old IBM keyboard that doesn't have a Windows/super key, and would like to remap the ...
1
vote
0answers
336 views

Map ACPI events to X keys (or to custom commands)

Some of the multimedia keys on my Lenovo X1 Carbon aren't recognized by xev. Each time I press the "volume down" key, for example, I get an output that looks like: FocusOut event, serial 34, ...
1
vote
0answers
316 views

Swap touchpad buttons independently of the touchpad

I use a Lenovo X250 with Debian. I have a touchpad with 3 physical buttons on top. Using xev I can see that these correspond to buttons 1, 2, and 3. Additionally, the touchpad itself can be pressed....
1
vote
0answers
70 views

How to translate modifier + key(control + space) into another modifier(shift)?

I'm using Ubuntu 16.04. I've tried xmodmap, xbindkeys + xdotool with no luck. Here's an example solution that I've tried with xmodmap. xmodmap -e "keycode 65 control = space Shift_L"
1
vote
0answers
336 views

Altering keyboard layout on plugging in or out

I use an external keyboard with my laptop and a script to change the keyboard layout depending on whether the keyboard is plugged in. This works fine, but I find it shouldn't be necessary to run the ...
1
vote
1answer
426 views

Unable to find keycode for volume key on Apple keyboard

Summary I switched to i3wm and I'm trying to set up my environment. I am using an Apple keyboard (circa 2007). It has three volume keys and I can't find their keycodes for mapping. Analysis I read ...
1
vote
0answers
463 views

Why is my rebinding of Caps Lock reversed?

I use this snippet in my Emacs startup file: (if (eq window-system 'x) (shell-command "xmodmap -e 'clear Lock' -e 'keycode 66 = F13'")) to rebind Caps Lock. However sometimes the binding ...
1
vote
0answers
849 views

xmodmap Alt+Tab doesn't work with new Alt_L key

I edited ~/.Xmodmap to set keycode 118 to Control_L, so that I have the same functionality for CTRL on both sides of Space. I had to remove and add Control_L to control and it works fine now. keycode ...
1
vote
1answer
549 views

.xsession executed on login in Linux Mint Cinnamon

I've put a command to change my keyboard mapping in .xession, but this does not appear to be executed on login in Cinnamon, although it seems to work fine on an older MATE box. Since first asking ...
1
vote
0answers
21 views

Key with modifiers to call certain behaviour in xmodmap

HW: Samsung N145 (10" netbook) OS: Xubuntu 14.10 Problem: Backspace key is not functioning. Want to make Backspace key behaviour be called by Ctrl+Del key combination. I guess it should be possible to ...
1
vote
0answers
55 views

execute command on pointer movement, wait and revert?

I've got two pointing devices (touchpad and trackpoint) and the goal is to execute a command when movement (any direction, any distance) is detected on the trackpoint, then wait a configurable amount ...
1
vote
0answers
83 views

is this a keyboard hardware limitation?

I have remapped Caps_Lock to Ctrl_L on an ancient mechanical keyboard. It is still impossible to use the caps lock key to produce key combinations like C-e. xev shows the following sequences are ...
1
vote
0answers
166 views

Remap Keys for ALL layouts

I put xmodmap -e 'keycode 97 = backslash' into a script that is executed at startup. My hardware is a Japanese keyboard, so it lacks some keys and has some extra ones and I am trying remap some of the ...
1
vote
1answer
438 views

Swap CapsLock and Control using xmodmap (man page solution does not work)

I have just upgraded from Fedora 14 with Gnome desktop to Fedora 20 with Mate desktop. Under F14, I previously swapped CapsLock with Control_Left, and Alt_Right with Control_Right. These I did by ...
1
vote
0answers
343 views

dead key after switching two keys with xmodmap

My keyboard switches the (German) keys [^] and [<], so I want to switch the two keys. I identified the keycodes using xev and created a file ~/.xmodmap containing keycode 94 = asciicircum degree ...
1
vote
0answers
68 views

I want to make both Control keys as a Super key

I want to make both Control_L and Control_R as a Super key (Windows Key). Is this possible? I only made Control_R as a Super key but I could not make Control_L. Here is what I done. xmodmap -e '...
1
vote
1answer
286 views

xmodmap causes incorrect keyboard shortcuts

I used xmodmap to switch the Caps Lock and Ctrl keys on my Thinkpad X120e. The keys are swapped but this has caused keyboard shortcuts in several applications to stop working correctly. In Libre ...
1
vote
0answers
270 views

xmodmap configuration to emulate Mac special key layout?

On my Mac, I frequently type curly quotes manually. For example, a left curly double quote is Option-[. I would like to do the same on my Linux box. I run vanilla X11 (FVWM) with no GNOME, KDE, etc. ...
0
votes
0answers
17 views

xmodmap “keycode” command confusion

I'm working on getting a custom xmodmap configuration set up and I can't for the life of me understand some of the behavior from the keycode NUMBER = KEYSYMNAME ... option. See below for some quick ...