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

learn more… | top users | synonyms

98
votes
3answers
46k 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 ...
24
votes
7answers
12k 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 ...
21
votes
5answers
14k 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, ...
19
votes
1answer
622 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 ...
16
votes
8answers
5k 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 ...
16
votes
9answers
1k 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 ...
15
votes
3answers
4k 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 ...
15
votes
1answer
801 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 ...
13
votes
4answers
738 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 ...
12
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 ...
12
votes
3answers
1k 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 ...
12
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 ...
12
votes
3answers
374 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 ...
12
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 ...
11
votes
3answers
3k 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 ...
11
votes
3answers
2k 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?
11
votes
1answer
401 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 ...
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.
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
2answers
818 views

Record every keystroke and store in a file

I need to record every keystroke and store in a file in the user directory ~, when using my account, I am not sudoer and I cannot install programs (like logKeys) in any way. How could I do so using ...
10
votes
4answers
4k 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, ...
10
votes
2answers
753 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 ...
10
votes
2answers
936 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 ...
9
votes
4answers
787 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
3k 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
2answers
3k views

How to remap the Context Menu key to the Super key

This keyboard has only one super key, so I want to remap the menu key to make up for that.
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
1answer
1k 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 ...
9
votes
1answer
894 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
2answers
3k 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
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 ...
8
votes
4answers
13k 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?
8
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 ...
8
votes
1answer
2k 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 ...
8
votes
2answers
3k 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 = ...
8
votes
1answer
3k views

Enable num-lock as default in Linux

There has been a similar question - but IMHO there has to be a simpler solution. If num-lock is on in the BIOS - why is it turned off during linux boot and/or KDE/Gnome/whatever startup?
7
votes
6answers
1k views

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

It's like this: “ (U+201C) ” (U+201D).
7
votes
1answer
296 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
1answer
1k views

What is the Mode_switch modifier for?

Playing with xmodmap I encountered a modifier key I hadn't heard of: Mode_switch. It seems to have something to do with inserting special characters. I assigned it to a key but it seems to have no ...
7
votes
2answers
947 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 ...
7
votes
2answers
345 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
2answers
3k views

command line retrieve list of all valid kbd layouts, variants and toggle options (to use with setxkbmap)

Is there a way from command line to retrieve the list of all available keyboard layouts and relative variants? I need to list all the valid layout/variants choices to be used then from setxkbmap. ...
7
votes
1answer
6k 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 ...
7
votes
2answers
333 views

Custom keyboard layout is reset to default after standby or reboot

I designed a keyboard layout for myself, after I run xmodmap it works OK, but after standby or reboot, the layout turn back to qwerty. How can I set it as default? My OS is Debian Wheezy with XFCE4. ...
7
votes
1answer
2k views

Korn Shell: End, pgup, pgdown, and delete key not working

So basically my End, Pageup/Pagedown, and Delete key are not working in ksh93. I'm running FreeBSD by the way. My arrow keys are working, and so is my home key. Those keys work when I put this in my ...
6
votes
3answers
2k views

In awesome window manager, how can I make key bindings send keyboard events?

I don't think that title probably helps very much, but here's my issue: I'm using the awesome window manager and am trying to make my key bindings to be similar in flavor to OSX for special keys. ...
6
votes
2answers
989 views

Is it possible for a daemon (i.e. background) process to look for key-presses from a USB keyboard?

I'm working on an embedded Linux project where I will be developing a program that will run automatically on bootup and interact with the user via a character display and some sort of button array. ...
6
votes
2answers
4k views

How do I temporary change my keyboard layout on Debian? (no X)

How can I quickly change my keyboard layout between US and German? setxkbmap does not apply here, as I only have an SSH shell. Persistent changes via dpkg-reconfigure keyboard-configuration ...