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

learn more… | top users | synonyms

6
votes
2answers
2k 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
184 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
628 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
2answers
506 views

Custom xkb layout in which one key creates two unicode code points

I am writing a new custom keyboard layout for Xorg, but there is one particular glyph which does not exist in Unicode. It is, however, easy to create it by using a standard letter plus a combining ...
6
votes
3answers
520 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
2answers
2k views

Permanently remapping a key on Linux

I'm using an aluminum Apple keyboard with my Mandriva 2010.2 Linux system. I remap the Apple Command key (⌘) to control using the following .Xmodmap file: keycode 134 = Control_R remove mod4 = ...
6
votes
2answers
279 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. ...
6
votes
1answer
580 views

Debian Wheezy, VirtualBox, HP DV6-7099EL problem with AltGr

I just bought a HP DV6-7099EL laptop (Italian keyboard). I'm going to install Debian in a week or two, I just want to test the computer without touching the partitions (just in case I need ...
6
votes
1answer
287 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 ...
5
votes
3answers
1k 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. ...
5
votes
2answers
2k views

assign shortcut key to run a script

I've written a script to change the brightness of my screen. It's useful when I am working on text mode and shortcut keys of my keyboard to change brightness doesn't work. Is it possible to run this ...
5
votes
1answer
2k views

USB Keyboard does not work with Grub

I am setting up Arcade Puppy http://scottjarvis.com/page105.htm on an old Dell GX50 PC. Instead of using a PS2 style keyboard which I don't have I opted for a low profile generic USB keyboard. The ...
5
votes
1answer
2k views

Why don't Page U/Down, Home/End work in less on Solaris over ssh from Ubuntu?

I need to work on a Solaris server over ssh from my Ubuntu (Lucid) laptop. I got Home/End Insert/Delete Page Up/Down working in csh and bash using bindkey and ~/.inputrc, respectively. But I can't ...
5
votes
1answer
2k 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. ...
5
votes
1answer
634 views

`p` key doesn't work in X

Today I had to force-shutdown my machine after it froze during resume from suspend. Since the reboot, I've found that the p key doesn't work normally in X. It does work normally in the console. ...
5
votes
1answer
29 views

monitoring events (keyboard, mouse) in X

Is it possible to display all events that are generated in Xorg? Such as keyboard pressed, mouse events...?
5
votes
1answer
62 views

Why does showkey show a different keycode compared to xev?

Looking for an answer I came across this question. There's something like this: The keycode X uses and the keycode the kernel uses are OFF BY 8 for "historical reasons". So take 97 - 8 = 89 and ...
5
votes
1answer
5k views

AltGr keys don't work with Ubuntu in VirtualBox

I just installed VirtualBox (from Oracle) in Windows 7, and created a virtual machine with latest Ubuntu. Here in Firefox I can use the left Ctrl key, while the right one doesn't have any effect. ...
5
votes
1answer
874 views

How to detect which keyboard device is being used

I'm working on a computer with two keyboards and two users. They are using different layouts. The two keyboards are identical. Their device ID can be found easily with xinput, but when typing we can't ...
5
votes
1answer
334 views

Swapping <esc> and <caps lock> in a way that persists with external keyboards

I have a file called ~/.speedswapper which contains the following: ! Swap caps lock and escape remove Lock = Caps_Lock keysym Escape = Caps_Lock keysym Caps_Lock = Escape add Lock = Caps_Lock ...
5
votes
2answers
298 views

how to deal with keyboard-greedy apps

I'm having a very specific problem, however any help will aid in understanding X's relationship to the keyboard. I'd like to be able to launch the ElectricSheep program on top of music playing from ...
5
votes
3answers
4k views

Cannot pair my generic keyboard via automatic PIN

I am using Xubuntu, pure Xfce, 64-bit. The problem: I have tried 2 ways; both have failed for different reasons: (1) the commandline way (see below) fails because at no stage does it actually ask ...
5
votes
1answer
199 views

Xorg key clicks?

I've currently got Fedora 9 on my home PC (yes, I know its quite old - but hell I only reboot it every 6 months - nevermind upgrading!) . My only niggle is that keyboard I've got has quite a different ...
5
votes
3answers
834 views

How to set an xmodmap file for the session manager (or at least SLiM) because of a broken physical key

I've got my laptop set up to boot directly into SLiM as the X session manager. However, the "M" key on my laptop is broken. I've gotten around this when logged in by using xmodmap to remap my ...
5
votes
4answers
1k views

Enabling Numeric Keypad

I have trouble with the numeric keypad (NumLock keys) being unusable while typing. While I don't think it's GUI specific, this happens both in Gnome and KDE. Sometimes it works in TTY, other times it ...
5
votes
1answer
514 views

Dead keys not working in Java Swing applications

I'm currently using Ubuntu 10.10 and Netbeans 7.0 and I can't type accented letters with dead keys any more. It's not a version specific problem seems it's related with Swing since I've got the same ...
4
votes
3answers
392 views

Ctrl-a does not take me to the beginning of the prompt while I am working within a GNU screen

To navigate to the starting and end of a command, I usually use Ctrla and Ctrle. However, when I work within a GNU screen, those keybinding do not work becuase perhaps they are being used by the GNU ...
4
votes
4answers
225 views

Continue for loop by keyboard

I have user account on a linux machine which I do not know its exact IP address. But I know a range which it is ran on one of them. I want to check which server is my desired server. There are some ...
4
votes
2answers
914 views

How to switch X windows from the command-line?

How can I create a script that automatically switches windows? I'm trying to do the same thing Alt+Tab does.
4
votes
2answers
531 views

Log number of keyboard hits

How can I log a keyboard hit via shell script? My aim is to log the number of keyboard hits of a login session on my Ubuntu system. Note: I do not want to log the keystrokes itself, only the number ...
4
votes
2answers
55 views

Print currently pressed keys to stdout and read them line by line

I want to know which keys are pressed on my keyboard and print the information to stdout. A tool that can do this is showkey. However, if I want to pass the data of showkey to read: while read line; ...
4
votes
3answers
1k views

how to assign another modifier to Alt key for X11?

Aim: I would like to assign Alt to CapsLock-key, and Meta to Alt-key. But in such way, Alt-key would no longer be recognized as Alt, and CapsLock-key would no longer be recognized as CapsLock. ...
4
votes
2answers
2k views

Some keys are invalid on emacs when using German keyboard

When I am using emacs 23.3 on KDE, I can not input ^, ´ and ~ from my German keyboard. If I press these keys, then emacs says that <dead-circumflex>, <dead-acute> and <dead-tilde> ...
4
votes
2answers
853 views

Why does Ctrl+Arrow make my terminal switch to a strange mode?

When i type Ctrl+Left or Ctrl+Right within Guake or gnome-terminal the last one's behaviour turns to a some kind of non-usual mode: - key acts like arrow up and + like arrow down, v runs Nano, etc. ...
4
votes
3answers
961 views

Set the key for spanish eñe letter

How can I map the spanish eñe letter to a key combination? What application is suitable for this purpose (xmodmap, xbindkeys, ...)? When I press Caps Lock + n, it should type ñ When I press Caps ...
4
votes
2answers
348 views

Disable the external keyboard from a script

I have a udev rule for my external keyboard. I can catch events, and by running a script I can also reach udev env variables. Can I disable keyboard with udev? Or must I use a script to disable the ...
4
votes
1answer
274 views

Map Super+[Left|Right] to Home/End

How do I map key "Super" so, when combined with Left/Right, it produces keycode Home/End? My current setxkbmap: setxkbmap \ -model pc105 \ -layout 'us(dvorak-intl),us(alt-intl)' \ -option \ ...
4
votes
1answer
768 views

Create and set custom keyboard layout

I want to create and set a custom keyboard layout with setxkbmap. I created a file in ~/.xkb/prog with this content: partial default alphanumeric_keys xkb_symbols "basic" { include "latin(type4)" ...
4
votes
1answer
692 views

What are/were the keys on a Sun keyboard for?

I have a Sun type 7 UNIX keyboard that I'd like to get more productivity out of. So what are those extra keys for, or rather, what were they intended for by Sun? And is there a way to approximate ...
4
votes
2answers
587 views

How to get user-level access to modifier keypresses in console app?

I need to get access to modifier-key state for a console app I'm writing (a personalized editor). Are there any packages/libs/whatever that provide this access? I cobbled the following from ...
4
votes
3answers
187 views

key bindings table?

Do we have a key bindings table that translates all the various ways of referring to a key press? I'm using zsh, but I presume that if there was such a table it would work for any shell. The reason I ...
4
votes
1answer
687 views

How can I automatically disable my laptop's built-in keyboard in X.org?

Distro and X.org Version Information I am using Ubuntu 12.10 with xserver-xorg/quantal 1:7.7+1ubuntu4. Disabling Built-In Keyboard in X11 I have a laptop with a built-in keyboard that no longer ...
4
votes
2answers
704 views

How does X map from kernel key scan codes to a keysym?

According to this page there is no direct mapping from udev key mappings to X, it has its own mappings. X has a (quasi) total independent way of mapping keys: X reads the kernel keycode table at ...
4
votes
2answers
1k views

Remapping caps-lock to escape, and menu to compose, on the linux console

When running X I use a .xmodmaprc to remap certain keys thusly: ! Make it so that both Caps Lock and Escape do Escape clear Lock keysym Caps_Lock = Escape ! Remap the menu key as Compose keysym Menu ...
4
votes
3answers
469 views

Diagnosing xmodmap errors

I'm getting this error when trying to use xmodmap to get rid of caps lock: $ xmodmap -e 'clear Lock' X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode ...
4
votes
1answer
2k views

Keyboard macros for X and/or KDE

I'm looking for a utility to record and playback keyboard macros in X applications (KDE specifically). I've tried xmacrorec and xmacroplay, but after running them, my mouse and keyboard does not ...
4
votes
1answer
368 views

Trying to set keyboard layout using Xorg configuration but it's not working

I'm trying to set my HP Pavilion g6 keyboard layout to English(us) and Arabic(ara). I'm using Fedora 18, but followed Arch Wiki anyways. Here's my 90-keyboard-layout.conf file : Section ...
4
votes
3answers
3k views

How do I change currently selected keyboard layout from command line?

I have my keyboard layouts (two of them) and switching between them configured via the following command: setxkbmap -layout us,ru -option -option "grp:lctrl_lshift_toggle,ctrl:nocaps" Now I want to ...
4
votes
1answer
198 views

detect if key is pressed from script

I would like to detect if a key is being pressed when running a script. I have the following script: #!/bin/bash sleep 0.5 xte 'str sometext' I run this script using a shortcut to paste "sometext" ...