Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using wmii, so Alt key Linux command was disabled.

I want to change Ctrl+F and Ctrl+B to Alt+ F and Alt+ B so that I can use them to jump by word.

But I searched on line, and didn't find anything about change Linux Command key bindings.

How to do it?

share|improve this question

closed as unclear what you're asking by Gilles, jasonwryan, Anthon, slm Jul 13 '14 at 0:14

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

Do you mean the console key bindings or do you want to remap Alt to Ctrl in X for all X applications? – Ruslan Jul 12 '14 at 8:46
That's because the GUI on linux based systems is heterogeneous, and you want to do this via your particular window manager or desk environment. So if you search for "how to do it on linux", you won't find anything. There aren't any "Linux Command key bindings", or at least very few and they aren't dynamic. Same for X. But your DE or WM probably has oodles and should let you configure them however you want. – goldilocks Jul 12 '14 at 9:29
@goldilocks you're wrong. There's DE/WM agnostic xmodmap(1). The OP assumes it's in X. – Ruslan Jul 12 '14 at 9:33
@Ruslan Yes, if you want to remap Ctrl <-> Alt, absolutely that is a good answer (there's already stuff around if you search for e.g., "linux remap key"). – goldilocks Jul 12 '14 at 9:36
I'm voting to close this question because even after reading the comments, I don't understand what you mean by “Linux command”. I think you're trying to change key bindings in an application, but which application? Given the comments, where you explain your real problem (not being able to use some modifier keys because you're running Linux in a virtual machine), @Ruslan's suggestion of moving the modifier keys to different keyboard keys is probably what you should do to solve your actual problem. – Gilles Jul 12 '14 at 19:40

The solution with wmii is to keep the Alt key for applications, and use another key, such as the Windows key, for the wmii command key, as describe in this wiki.

share|improve this answer
17, the pathetic thing is, I got to use visual box for ubuntu under windows 7, and the damn win + L can't be forbidden. – Zen Jul 12 '14 at 9:50
17, But fortunately, I've got a second_way to realize my purpose, ctrl + arrow_left/ arrow_right can do what I want. Thanks for both you and Ruslan. – Zen Jul 12 '14 at 9:51

It seems a little bit complex to change that key binding.

But if you want to jump by word.

You can try use ctrl + arrow_left and ctrl + arrow_right

It would do what you want.

share|improve this answer
I assume that you're using Emacs here. Note that for the other key sequences using the Meta (Alt) key, you can also use the ESC key instead (they are synonymous in Emacs). But you may have similar problems with other applications that need the Alt key (mod1) for their shortcuts. I suggest that you change the wmii command key from mod1 to mod4 (AFAIK, mod1 is often used by applications, which is not the case of mod4), as described in the wiki (see my answer). You'll have to find which key corresponds to mod4 (Windows key?). – vinc17 Jul 12 '14 at 10:31
@vinc17, I use vim. – Zen Jul 12 '14 at 10:33
yes, esc works, but it's not convenient enough, so far from my fingers – Zen Jul 12 '14 at 10:34
@vinc17, before I use win key for modkey, but the win+L lock screen issue is nearly unsolvable. So I changed to alt key. – Zen Jul 12 '14 at 10:35
I didn't know that vim had the same (or similar) bindings as Emacs. I agree that the ESC key is less convenient, but this is good to know as it can sometimes be useful (e.g. when connecting via SSH from terminals that won't have a Meta/Alt key). – vinc17 Jul 12 '14 at 10:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.