Forget making an alias, there's an even easier way -- map it to an Fkey. I'll try to dig up my old.Xmodmap file, but it comes down to this: make two functions in the file, one to set QWERTY keycaps and one to set Dvorak keycaps, and assign them to two Fkeys (say, F11 & F12). (Or, if you prefer a toggle, assign one to a single Fkey, and have each function assign the other to the Fkey as part of the remapping.) That way, you don't need to be in a shell to change between the two.
It sounds odd, but think of it this way: once you're used to ctrl-key combinations, you stop actively thinking "Copy is ctrl-c, so control is here, and C is here"; you think "Copy!", and your fingers do the walking. The same goes (doubly so) for Emacs -- after using it for seven years, I don't think about "move to previous line" as being ctrl-p, I think about it being particular hand and finger movements.
When I first tried Dvorak, I changed all keys -- and felt like an Emacs newbie for the first time in years. ("Huh? Why did the screen refresh 3 times? What, that's L now? Fsck! Where did P move to?" Also, I was learning Dvorak on a computer lab's QWERTY keyboards, so hunt & peck meant digging up docs - while still inside Dvorak.) After banging my head against this particular brick wall several times, I tried changing the control keys back. All of my hands' hotkey training worked again; and, since I don't associate those hotkeys with the letters anymore, it didn't screw me up for actual typing.
Given, this was under X11, so breaking the keymap halfway like that was easy. I have no idea how you would go about doing so for keymaps in Windows or Macintosh.
The console already supports keyboard remapping; check out "loadkeys", and the keymaps dir named in its man page. My Redhat box came with a few dvorak files: normal, one-handed (one for left-handed, one for right-handed), and the changes for ANSI's stacked braces/brackets. I haven't tried the dvorak layout with it, but Emacs was much happier after I "fixed" meta handling.:-)
Forget making an alias, there's an even easier way -- map it to an Fkey. I'll try to dig up my old .Xmodmap file, but it comes down to this: make two functions in the file, one to set QWERTY keycaps and one to set Dvorak keycaps, and assign them to two Fkeys (say, F11 & F12). (Or, if you prefer a toggle, assign one to a single Fkey, and have each function assign the other to the Fkey as part of the remapping.) That way, you don't need to be in a shell to change between the two.
- Change normal keys and shift+keys to Dvorak, but
- leave all control+keys and alt+keys as QWERTY.
It sounds odd, but think of it this way: once you're used to ctrl-key combinations, you stop actively thinking "Copy is ctrl-c, so control is here, and C is here"; you think "Copy!", and your fingers do the walking. The same goes (doubly so) for Emacs -- after using it for seven years, I don't think about "move to previous line" as being ctrl-p, I think about it being particular hand and finger movements.When I first tried Dvorak, I changed all keys -- and felt like an Emacs newbie for the first time in years. ("Huh? Why did the screen refresh 3 times? What, that's L now? Fsck! Where did P move to?" Also, I was learning Dvorak on a computer lab's QWERTY keyboards, so hunt & peck meant digging up docs - while still inside Dvorak.) After banging my head against this particular brick wall several times, I tried changing the control keys back. All of my hands' hotkey training worked again; and, since I don't associate those hotkeys with the letters anymore, it didn't screw me up for actual typing.
Given, this was under X11, so breaking the keymap halfway like that was easy. I have no idea how you would go about doing so for keymaps in Windows or Macintosh.
The console already supports keyboard remapping; check out "loadkeys", and the keymaps dir named in its man page. My Redhat box came with a few dvorak files: normal, one-handed (one for left-handed, one for right-handed), and the changes for ANSI's stacked braces/brackets. I haven't tried the dvorak layout with it, but Emacs was much happier after I "fixed" meta handling. :-)