General keyboard topics, including keyboard hardware and keyboard functionality in software.

learn more… | top users | synonyms

84
votes
6answers
4k views

How to run a command without hitting Enter Key?

Accidently I mapped Enter key via xkbset to Pointer_button2. Now every time I hit Enter some gibberish text appears. I thought of a workaround involving remapping it back but that means I will have to ...
78
votes
2answers
32k views

How to unfreeze after accidentally pressing Ctrl-S in a terminal?

It's a situation that has happened quite often to me: after I press (with a different intention) Ctrl-S in a terminal, the interaction (input or output) with it is frozen. It's probably a kind of ...
20
votes
7answers
9k views

How do I get current keyboard layout?

I'm wondering is there any command line tool, that returns current keyboard layout. I have XkbLayout set to us, ru. Update: setxkbmap returns layout settings, not selected layout. E.g.: $ setxkbmap ...
19
votes
4answers
9k views

How to get keycodes for xmodmap?

I'm trying to use xmodmap to remap Alt / Super keys on Dell L100 keyboard, and have trouble getting the keycodes. For instance, using xev doesn't give me keycode for Alt FocusOut event, serial 36, ...
15
votes
7answers
4k views

Disable Keyboard & Mouse input on unix (under X)

How can one programmatically "freeze" the Keyboard & Mouse temporarily, so that no one could mess with the system? There are several possibilities where this is useful. For instance, I have a ...
15
votes
1answer
175 views

How do keyboard input and text output work?

Suppose I press the A key in a text editor and this inserts the character a in the document and displays it on the screen. I know the editor application isn't directly communicating with the hardware ...
15
votes
1answer
654 views

Switch between numbers and symbols on caps lock

Is it possible to set caps lock to switch between inserting numbers and the symbols they normally trigger when one holds shift? e.g. when you normally press the 9 key, you get a ( unless caps lock is ...
14
votes
3answers
3k views

How to fix Ctrl + arrows in Vim?

I am using Putty -> Suse box -> vim 7.2 combo for editing and want to remap Ctrl + arrows combo to a particular task. But for some reason, Vim ignores the shortcut and goes into insert mode and ...
13
votes
4answers
524 views

Is there any reason why I get ^[[A when I press up arrow at the console login screen?

Whenever I'm at the console login, I press up arrow intentionally to see the previously typed commands. But I see this ^[[A. But when I press Ctrl Alt Print Screen Scroll Lock Pause Break Page Up ...
11
votes
3answers
3k views

ESC key causes a small delay in terminal due to its Alt+ behavior

My terminal setup is gnome-terminal + tmux + zsh with vi bindings. In applications like vim or even in the zsh's command line vi editing mode, I need to frequently hit the ESC key but there is a ...
11
votes
3answers
5k views

How does keyboard mapping work in Linux? [duplicate]

I have always had trouble with understanding the way keyboard mapping and related things are put together in Linux. When things break, it makes my blood boil if I have to sift through endless ...
11
votes
5answers
638 views

Keep NumLock always on

I have standard keyboard with numerical keys on the right side (I guess it's called 104-key keyboard). I want to use the numerical keys only as numerical keys. That means, I don't want the NumLock to ...
11
votes
3answers
269 views

How can I write a “idempotent” .Xmodmap

Currently I have an .Xmodmap file that changes my Command to Ctrl, then changes my Ctrl to Super (I'm running Linux on a Mac). It works quite well, when only run once but on successive runs (for ...
11
votes
5answers
1k views

Disable Keyboard & Mouse Temporarily

I would like to know how one can disable the keyboard & mouse temporarily in OS X.
11
votes
1answer
1k views

Fix Fn-keys for keyboard illumination

I've tried following the Ubuntu hotkeys/media keys troubleshooting guide and /usr/share/doc/udev/README.keymap.txt.gz to make the Fn keys work. After copying the map file and modifying ...
10
votes
4answers
1k views

How do I trigger autocomplete without a tab key?

I'm ssh-ing to my machine using my iPhone with an app called ServerAuditior. It doesn't have tab key. See screenshot. How do I trigger autocomplete without the tab key? I don't want to type a lot of ...
10
votes
3answers
789 views

How can I keep control+d from disconnecting my session?

I regularly ssh to a centos 5 box. Somehow they keys are mapped so that control+d will log me out of my current shell. If I am sudo'ed to another use it puts me back to the previous user. If I am not ...
10
votes
3answers
1k views

Remap CapsLock to Escape and Control System Wide

Is it possible to remap the CapsLock key system wide such that when the CapsLock button is pressed by itself it acts as the escape key and when pressed with another key it acts as the control key?
10
votes
1answer
333 views

Get the keycode of a key, from a custom made keyboard

I'm trying to transform a Minitel to a computer with a Raspberry Pi. This is a minitel: So I soldered the matrix of the minitel keyboard to a usb keyboard pcb, like this: Everything is working ...
9
votes
4answers
709 views

How do I disable or change the caps lock key on my keyboard?

We have ergonomic keyboards at work which I'm not entirely used to. I seem to keep hitting the capslock key while I'm in vim and it's starting to annoy. How can I disable this key, and or change to to ...
9
votes
2answers
2k views

Map “windows” key on keyboard to “ctrl”

I am on Ubuntu and using a Microsoft keyboard. I want to map my Win key to a Ctrl key. How can I do that?
9
votes
2answers
2k views

What does raw/unraw keyboard mode mean?

In the magic sysrq key combinations, there is the combination alt+sysrq+r which, according to wikipedia, does the following: Switch the keyboard from raw mode, the mode used by programs such as ...
9
votes
4answers
3k views

Reassign Ctl and Alt keys - xmodmap error

I am attempting to remap my keyboard in order to make emacs usable - my ergonomic keyboard puts its single Control key in an isolated 4-key island way off to the left. The OS is debian squeeze. Here ...
9
votes
2answers
2k views

Mapping key combination with xmodmap

I'm trying to achieve the following mapping keycode 135 = <Ctrl-C> Is it possible to achieve this in some way?
9
votes
1answer
743 views

second keyboard to run commands

On my computer I have two USB keyboards plugged in. Instead of having both just type the same key, is it possible for a second keyboard to be setup to run commands instead of typing letters? And If ...
9
votes
1answer
2k views

How can I type Unicode characters into KDE's Konsole terminal from a Gnome desktop?

I use Ubuntu.. In 'gnome-terminal', I can type Unicode Codepoints by first typing Ctrl-Shift-u followed by the Codepoint hex value, eg. C-S-u 2468 produces ⑨ konsole, my preferred terminal, does ...
9
votes
2answers
607 views

Script to quickly test all keyboard keys

I need to check some notebooks for bad keyboard keys, and so I'd like to speed that up as much as possible. I found nothing for this specific task, so my idea is a script that reads the pressed keys ...
8
votes
2answers
1k views

How to disable caps-lock, without remapping or disabling it?

I have an X11 program that grabs caps-lock, and uses it. The problem is, I want to disable the regular caps-lock toggling, but doing so seems to disable the key. So whatever X11 gets for a caps-lock ...
8
votes
1answer
943 views

Adjusting keyboard sensitivity in a command line terminal?

When using a tty login shell by entering Ctrl-Alt-F1 from an Ubuntu 12.04 install on a laptop the keyboard seems overly sensitive and if my finger lingers for a moment on a button I end up with ...
8
votes
2answers
632 views

Manipulating X key and pointer grabs on the command line

What command line tools exist to list and manage X server grabs? (That's grab as in key and pointer grabs, i.e. restricting the use of a particular key or mouse button to a particular application, or ...
7
votes
4answers
10k views

How to inject keystrokes via a shell script?

I'm trying to inject keystrokes into the input daemon so as to simulate typing from a Bash script. Is this possible, and if so, how can I make it happen?
7
votes
1answer
1k views

Relationship of keyboard layout and xmodmap

I'm using Xubuntu. Before login I can choose a keyboard layout. I'm using xmodmap for remmaping some keys. I'm interested in two things: How the state of keyboard mapping changes when I turn the ...
7
votes
4answers
2k views

How do I type the degree symbol under X11 (using a default English keyboard layout)?

I'm trying to put in an email the temperature outside in degrees. On my Mac, the degree symbol (°) is Option+Shift+8. But I'm writing the email in Thunderbird on an Ubuntu 10.10 with the default US ...
7
votes
6answers
1k views

how to type “smart quotes” (U+201C, U+201D)

It's like this: “ (U+201C) ” (U+201D).
7
votes
4answers
3k views

Why is the US international keyboard layout on Debian different?

Edit: I realized that the "problem" was not only in Ubuntu but in Debian itself and Ubuntu just inherited it, so I had this migrated from Ask Ubuntu I have been using Linux on and off for 10 years, ...
7
votes
2answers
2k views

Remapping Caps Lock with xmodmap doesn't work

When I program I like to swap these keys: Esc ↔ Tab Ctrl ↔ CapsLock In ~/.xmodmap, I have specified these re-mappings: keycode 66 = Control_L keycode 37 = Caps_Lock keycode 23 = Escape keycode 9 = ...
7
votes
1answer
252 views

Recovering from Sys Rq + r

I had a really bad lockup of my X server and had to do a Sys Rq + r to release my keyboard from X and get into a console. I was able to kill the process that was locking up my system, and continue my ...
7
votes
2answers
212 views

tmux not respecting disabled control flow

In my shell I have flow control disabled using stty -ixon. This works perfectly in the shell and when I launch tmux and start programs within tmux. However, when starting a new session from the ...
7
votes
1answer
5k views

Switch VI to use backspace key instead of Control+H for backspace?

I'm on Solaris 10 and by default vi version SVR4.0, Solaris 2.5.0 is installed. The system was set up so that when I ssh to it Control+H does backspace, and backspace outputs ^? I added stty erase ...
7
votes
3answers
1k views

Is there something that will generate keyboard's click sounds?

I miss using a clicky keyboard at work. It's a fairly quiet office, so I'm stuck using a nearly silent keyboard. The upshot is that I can wear headphones. Is there something in Linux or X that can ...
6
votes
2answers
469 views

How to force release of a keyboard modifiers

Sometimes, when I use synergy between my machines when one is using full-screen VirtualBox guest I get stuck with some weird key modifiers turned on. If they exist on my keyboard (like Shift_L) I can ...
6
votes
1answer
297 views

How to disable keyboard?

Without unplugging my keyboard I'd like to disable it from the terminal; I was hoping that this could be done using rmmod but based on my currently loaded modules it doesn't look like it is possible. ...
6
votes
2answers
770 views

UTF8 math symbols & keyboard layout / input

I'd like to use UTF8 math symbols, when typing one list, another list. I've found sth called ComposeKey. Unfortunately it's not covering omega, theta, rightarrow etc. I am using KDE, I've tried ...
6
votes
1answer
60 views

How to make a key simulate another key?

In my keyboard the I key doesn't work. So, I use an on-screen keyboard. I'm using Ubuntu 13.04. But its hectic. Is there a way so that I can make another key (for example Home on my keypad) to behave ...
6
votes
2answers
1k views

Grub 'incompatible license' error

The other day, I was using a laptop for general desktop use when its keyboard began to act up. Most of the keys on the keyboard's right side stopped working entirely and key combinations such as Ctrlu ...
6
votes
1answer
173 views

Why does mapping <esc> cause arrow keys to fail in vim?

When I do inoremap <Esc> <Esc>`^ in vim, the next time I switch to insert mode (after using Esc) the arrow keys fail to move the cursor (they insert letters instead). Why does that ...
6
votes
2answers
548 views

Share keyboard over network as separate device?

I am trying to achieve something similar to this: http://superuser.com/questions/67659/linux-share-keyboard-over-network The difference is that I need the remote keyboard to be usable separate from ...
6
votes
3answers
480 views

Turn off Caps lock when Escape is pressed

Is there any way to disable CapsLock whenever Esc is pressed. Yes, I use VIM! I actually have an alternative all-caps keyboard layout on Ctrl-6 but I find it cumbersome and would prefer to just have ...
6
votes
1answer
261 views

Application-specific keymapping

In general, I want to make specific keymaps for application, that working only in it and doesn't affect any other app. For example, I already use my Caps key to toggle input language (via xorg.conf), ...
6
votes
1answer
1k views

Using setkeycodes to map pressed and released to different “keys”

I have a keyboard that has a scroll wheel, but it doesn't work on Ubuntu and xev command doesn't show anything when moving it. But with the dmesg command I found this: When moving the scroll wheel ...