all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "B. T. Raven" <nihil@nihilo.net>
To: help-gnu-emacs@gnu.org
Subject: Re: keyboard-translate working for Control but not for Alt
Date: Thu, 06 Aug 2009 11:34:46 -0500	[thread overview]
Message-ID: <jb6dnXqt4aSbm-bXnZ2dnUVZ_qydnZ2d@sysmatrix.net> (raw)
In-Reply-To: <431b46e1-18f0-4124-b8b0-dd26500ae158@z4g2000prh.googlegroups.com>

Elena and Xah:

A conservative approach to Emacs ergonomics with a Dvorak keyboard on 
w32  is to pull the keycaps, including the bottom row and use Keytweak 
to reassign the mod keys:

super alt ctl spacebar ctl alt super hyper

this along with something like the following added to .emacs allows for 
minimum secondguessing of the Emacs key-binding philosophy as it has 
evolved over the last 20 years:

;; Single char cursor movement on Dvorak layout
(global-set-key [(meta h)] 'backward-char)
(global-set-key [(meta n)] 'forward-char)
(global-set-key [(meta c)] 'previous-line)
(global-set-key [(meta t)] 'next-line)
(global-set-key [(meta H)] 'mark-paragraph)
(global-set-key [(meta N)] 'next-buffer)
(global-set-key [(meta C)] 'capitalize-word)
(global-set-key [(meta T)] 'transpose-words)

;;substitute for stolen metakeychords ad libitum
(global-set-key [(control n)] 'next-line-mark)
(global-set-key [(control p)] 'center-paragraph)
(global-set-key [(control b)] 'beginning-of-line-mark)
(global-set-key [(control f)] 'find-function-at-point)
(global-set-key [(shift control f)] 'find-variable-at-point)

If all mod keys could be placed for easy access from the home keys and 
if there were some way to make the simultaneous pressing of 3 mod keys 
sticky (i.e allowing further mod keys to be stacked on top of them) then 
one could touch type things like shift control alt super hyper meta a



Xah Lee wrote:
> additional info i just found out ....
> 
> this method
> (global-set-key (kbd "C-t") ctl-x-map)
> 
> turns out to have other problems as well, when cua-mode is on.
> 
> with cua-mode on, and when you have a text selection, you need to
> press C-x twice quickly to invoke the traditional C-x role. (at least
> as one of the method, anyway) So, that means you press C-t twice
> quickly.
> 
> One example i'll need to do this many times per day is “C-t r
> t” (string-rectangle) and “C-t r k” for kill-rectangle, where you do
> need a selection on first.
> 
> With
>  (keyboard-translate ?\C-t ?\C-x)
> i used in the past, i didn't encounter problem.
> 
> i started to use cua-mode since last year, not because i need it, but
> more for testing compatibilty with my ergoemacs setup.
> 
> So, with cua-mode on, and with
> (global-set-key (kbd "C-t") ctl-x-map),
> now “C-t r t” no longer works... it seems to be calling transpose-
> lines...
> 
> in short, all these extra personalized fixes creates a lot
> complications. If emacs dev made cua mode's intended purpose by
> default, which as a side effect most of these complications will be
> gone, as compared to indivdualistic customization that tried to
> achieves the same thing. This is because when emacs has something out
> of the box, the implementation is more throughly examed at some lower
> level, i.e. creating much more robustness than individual hacks. If
> emacs dev decided that Ctrl + XCV should be the shortcut for emacs,
> the proper solution is probably not even using cua-mode, since itself
> is a quite complex hack.
> 
>   Xah
> ∑ http://xahlee.org/
> 
> ☄
> 
> On Aug 5, 3:37 pm, Xah Lee <xah...@gmail.com> wrote:
>> Hi Elena,
>>
>> ; Make C-t acts like C-x, so that C-x is easier to type on dvorak
>> ; (keyboard-translate ?\C-t ?\C-x)
>> ; but this means  ALL your C-t keys becomes C-x.
>> ; So, for example, in outline-mode, C-c C-t runs hide-body.
>> ; But now, when you type that, you get C-c C-x instead.
>> ; A better solution is:
>> ; (global-set-key (kbd "C-t") ctl-x-map)
>>
>> i've been using
>> (keyboard-translate ?\C-t ?\C-x)
>>
>> for the past ~5 years or so. In pratice, i never noticed any problem,
>> prob because C-t hardly used as embedded combo in a key sequence, or,
>> when it is used, such commands are often advanced features or not
>> commonly needed.
>>
>> in fact, the example C-c C-t in outline-mode i only noticed yesterday,
>> as i was browsing emacs 23's News file which is in outline-mode. Other
>> than this, i've not used outline-mode.
>>
>> I switched to
>>
>> (global-set-key (kbd "C-t") ctl-x-map)
>>
>> yesterday, and noticed that it has problems too.
>> I often do “C-x r l” to get my bookmark list.
>> So, this means i've been pressing “C-t r l” in the past ~5 years.
>> But if you are in dired, that no longer works with the new setup. “C-t
>> r” invokes image-dired-delete-tag.
>>
>>   Xah
>> ∑http://xahlee.org/
>>
>> ☄


  parent reply	other threads:[~2009-08-06 16:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-04 14:39 keyboard-translate working for Control but not for Alt Elena
2009-08-04 17:18 ` harven
2009-08-04 17:20   ` harven
2009-08-04 18:15 ` Xah Lee
2009-08-04 18:37   ` Xah Lee
2009-08-04 18:36 ` Johan Bockgård
2009-08-05  8:07 ` Xah Lee
2009-08-05 22:37   ` Xah Lee
2009-08-06  0:40     ` Xah Lee
2009-08-06  2:29       ` Xah Lee
2009-08-06 16:34       ` B. T. Raven [this message]
2009-08-06 21:04         ` Elena
2009-08-06 21:08           ` Elena
2009-08-07  4:02             ` B. T. Raven
2009-08-07  4:06           ` B. T. Raven
     [not found] ` <mailman.3870.1249411036.2239.help-gnu-emacs@gnu.org>
2009-08-06  7:54   ` Elena
2009-08-06 11:01     ` Bernardo
     [not found]     ` <mailman.4020.1249556773.2239.help-gnu-emacs@gnu.org>
2009-08-06 12:22       ` Elena

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jb6dnXqt4aSbm-bXnZ2dnUVZ_qydnZ2d@sysmatrix.net \
    --to=nihil@nihilo.net \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.