EzDevInfo.com

keymap interview questions

Top keymap frequently asked interview questions

How to change console keymap in Linux?

I'd like to exchange Esc and CapsLock in console (not in X, and use xev), how can I do it?

My OS is Ubuntu.


Source: (StackOverflow)

Which keymap should I use for a wired Mac keyboard in Gentoo Linux?

I just purchase the new wired Mac keyboard:

enter image description here

Running on Gentoo Linux it works mostly fine. The only problem I am having is the function keys and swapping the Alt and Command keys to resemble a regular PC keyboard. When I tried switching to the "mac-us" keymap in /etc/conf.d/keymaps I got garbage when typing (not even qwerty).

Are there any specific keymaps I can use to get what I want?


Source: (StackOverflow)

Advertisements

How to re-map command and option keys on Mac OS X with a PC-keyboard?

in my keyboard the command key is mapped to the windows key (I'm using a regular PC keyboard) so I only have a left command, because the space on the right is occupied by the useless Fn key.

I've used Ukelele and also edited keyboard mappings but that's for printable characters, doesn't actually allow you to map modifier keys on the keyboard.

Thanks!


Source: (StackOverflow)

How to swap the "fn" use of Function keys on al Apple Keyboard in Linux

I have an apple slim keyboard (USB) and if I want to use one of the Function Key as-is, I also have to press "fn " key first. Otherwise, it will try to perform the other function of the key, such as increasing or decreasing the display intensity, change the volume/mute, etc....

As well, the fn key is actually in the position of the "insert" key for regular keyboards. How can I fix all of that ?

I really like this keyboard, as it make my typing much easier, and much more silent too. But some of those mappings that are different sometime bug me.

Thanks :-)


Source: (StackOverflow)

How to get the key name to be coded for keymap in vimrc?

In Emacs, I can press Ctrl-h, k, to describe a key. I can get the key name even it's undefined, e.g.,

C-x <C-M-end> is undefined

Thus, I got to know the key name is C-x <C-M-end>.

But how can you get the key name for Vim?

I want to setup a keymap for Ctrl-Shift-V and Shift-Insert, but what the code shall I have to use?

Is it possible to get the key name on the fly?


Source: (StackOverflow)

Keys all switched on keyboard

My friend/enemy switched the keys on my keyboard as an April fool's joke. When I press Y, Z appears on the screen. Some keys work like b, x, g, i, d, and a few more. Also, when I press ctrl, it returns Enter. Even the function keys are switched!!

I called a technician and even he wasn't able to detect the issue and told me installing the operating system was the only go. I really don't want to call up my friend and ask him.

I'm on Windows 7 Professional 64-bit and there is no problem with my mouse. (Thank God)

Can you help me?


Source: (StackOverflow)

Notepad++: Ctrl-S does not Save, instead inserts [DC3]; Ctrl-F inserts [ACK]

I've been using Notepad++ more as my primary code editor. Just a few minutes ago, however, I accidentally pressed some combination of keys (no idea what I pressed) and suddenly my standard shortcut keys no longer work.

When I press Ctrl-S, it doesn't save my document; instead it inserts this funky little "DC3" character (looks like a rounded black rectangle with white text inside). When I press Ctrl-F (the Find key) I get a similar "ACK" symbol.

The only answer I've found on the web has to do with changing your shortcut key mappings; however my shortcut key mappings have NOT CHANGED at all, they are still set as they should be, with Ctrl-S mapping to "Save" and Ctrl-F mapping to "Find..".

I've clearly switched to some bizarre alternate key mode, but I have no idea what that might be or how to get rid of it.

Update: I've played around a bit more to see what other shortcuts are broken. So far, they all seem to be, except for the Windows standard ones like "Ctrl-X" and "Ctrl-V". Here's a sampling:

KEY             Should Do:            Current Behavior:

Ctrl-Tab        Cycle open tabs       <does nothing>
Ctrl-W          Close current tab     [ETB]
Ctrl-N          Open New tab          [SO]
Ctrl-O          File Open window      [SI]
Ctrl-A          Select All            [DC3]
Ctrl-Z          Undo                  <Works as expected>
Ctrl-C          Copy selection        <Works as expected>
Ctrl-U          Make lowercase        [NAK]

Source: (StackOverflow)

Synergy Key Mapping

I'm running a Synergy server on Ubuntu and a Synergy+ client on OSX. The server has a standard windows keyboard with shift, ctrl, windows, and alt keys. My MacBookPro has shift, fn, control, alt/option, and command keys.

When I press ctrl-c, ctrl-v, etc, the appropriate copy/paste action doesn't happen on the Mac, but it does in Ubuntu. If I'm controlling the mac, and press alt-c, alt-v, then I get the copy/paste action.

So I played around with key mapping in synergy.conf and found that the following allows me to do copy/paste with ctrl-c/ctrl-v:

section: screens
    godzilla:
    mbp.local:
        ctrl = alt
        alt = ctrl
end

Is this all that I need to do? Or are there other mappings that will help as well? The synergy configuration page refers to the following key mappings. What are the equivalent keys for each of these on the Windows keyboard and Mac keyboard? What is a meta or super key?

shift = {shift|ctrl|alt|meta|super|none}
ctrl = {shift|ctrl|alt|meta|super|none}
alt = {shift|ctrl|alt|meta|super|none}
meta = {shift|ctrl|alt|meta|super|none}
super = {shift|ctrl|alt|meta|super|none}

Thanks!


Source: (StackOverflow)

windows 8 tablet keyboard has no pause break key

I've got a Samsung Slate Windows 8 tablet. There is no break/pause key on the bluetooth keyboard. How can I remap those keys or is there a work around? These keys are relevant to programmers as they are often used in debugging and process interruption.


Source: (StackOverflow)

Mapping Super+hjkl to arrow keys under X

I'm trying to map:

Super+h -> Left
Super+j -> Down
Super+k -> Up
Super+l -> Right

globally under X. The idea is I don't want to leave my home row that often to use the arrow keys, so I'll use the Super modifier + hjkl to emulate the arrow keys under X. Is there any way to do this?

One thing I've tried is xbindkeys + xte using this configuration:

"xte 'keydown Up' 'keyup Up'"
  Mod4+k

"xte 'keydown Down' 'keyup Down'"
  Mod4+j

"xte 'keydown Left' 'keyup Left'"
  Mod4+h

"xte 'keydown Right' 'keyup Right'"
  Mod4+l

but there seems to a large delay between me pressing the key and noticing any result, and most of the time nothing happens at all.

Is there a more elegant way of doing this that actually works with no delay?


Source: (StackOverflow)

How can I type a backslash with no backslash key?

I'm trying to use a UK keymap on a physical US keyboard on my notebook (Asus Zenbook UX31E). My keyboard has vertical bar and backslash (| and \) above the Enter key, but I get hash and tilde instead. On UK keyboards, pipe and backslash seem to be just to the left of the Z key. Unfortunately, I don't have that physical key at all; instead, I just have a fat left Shift key. They needed an extra key to make room for £ and €, so things have moved around a bit, I guess.

I need vertical bar (for pipe) all the time in Linux, and, fortunately, found that with Right Alt+`.

Is there any similar trick for getting a backslash?  Unfortunately, I don't have a numeric keypad, so I couldn't get an escape sequence like Alt+92 working.

By the way, Shift+` gives me the "not" sign, ¬ (which I call "planking L").  I don't think I'll ever need that, so whilst an existing sequence to get a backslash is preferable, a solution that allows me to map backslash onto Shift+` is also acceptable to me.

By the way, I am using Gnome / Ubuntu 13.10.


Source: (StackOverflow)

F3-F5 keys incorrectly behaving as audio keys

I don't know if this is a configuration issue or a hardware issue, but I have a Kinesis Advantage USB keyboard and for some reason the F3-F5 keys aren't responding as they used to. They don't respond to anything and, when I tried using F5 on Emacs, it said <XF86AudioNext> is undefined, so I guess it's a weird mapping problem.


Any idea how I could remap them to the original meaning?


Source: (StackOverflow)

Switch the keys caps lock and shift

Is there a way to switch the shift key with the capslock key?

I have a problem with the shift keys, and I would like to use the caps lock keys, instead of the left shift key. Mac OS X settings allow to modify the keys used for some modifiers, but it doesnt't allow to change the key used for the shift key, nor to select the shift keys as alternative key for another modifier.


Source: (StackOverflow)

In Linux, how can I map SHIFT_L/SHIFT_R when pressed without additional key?

Today I found this very nice article by Steven Losh in which he presents a couple of productivity boosting keyboard mappings. Among them is a dynamic mapping of the left and right shift keys.

The Idea

When Shift_L or Shift_R are pressed without an additional key they are mapped to '(' and ')' respectively, otherwise they function as usual.

The Problem

He does all of this under OSX. I am trying to achieve the same under Linux. There is no straightforward way for this since as I understand you can't use xmodmap to configure one key for Shift_L alone, and another for Shift when used as a modifier key.

I have googled around a bit and found people trying to do the same under Windows which is apparently possible using AutoHotKey, but I could not find anything for Linux.

Is there a way to solve this under Linux?


Source: (StackOverflow)

How do I make Mac OS X remember "Modifier Keys" remappings for my external keyboard?

(to be clear, I know there are similar questions such as "How can I remap windows and alt keys in OS X?" - I'm not asking that. I can make the changes I want, they just get reset every time I unplug the keyboard)

So: Mac OS 10.6.5 on a MacBook Pro, with a Microsoft Natural Ergonomic Keyboard 4000 plugged in via a USB hub, along with other peripherals.

I want to switch the Alt and Windows keys, so their positions match that on the MBP's keyboard (Win key works as Command key with the Mac).

Sys Prefs / Keyboard / Modifier Keys does the job, until I unplug things to work elsewhere. Come back, plug the USB hub in as before, and my Option/Command swap has been forgotten.

Any suggestions as to how to get Mac OS to remember the swap?

Update:

The problem has vanished for me under OS X Lion. Same hardware, same hub, all of the modifiers are remembered.


Source: (StackOverflow)