From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: keyboard-translate working for Control but not for Alt Date: Thu, 06 Aug 2009 11:34:46 -0500 Message-ID: References: <431b46e1-18f0-4124-b8b0-dd26500ae158@z4g2000prh.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1249576950 11297 80.91.229.12 (6 Aug 2009 16:42:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Aug 2009 16:42:30 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 06 18:42:23 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MZ62o-0006v6-QM for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Aug 2009 18:42:23 +0200 Original-Received: from localhost ([127.0.0.1]:49138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MZ62o-0000xp-4l for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Aug 2009 12:42:22 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!backlog2.nntp.dca.giganews.com!nntp.sysmatrix.net!news.sysmatrix.net.POSTED!not-for-mail Original-NNTP-Posting-Date: Thu, 06 Aug 2009 11:34:13 -0500 User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) Original-Newsgroups: gnu.emacs.help,comp.emacs In-Reply-To: <431b46e1-18f0-4124-b8b0-dd26500ae158@z4g2000prh.googlegroups.com> Original-Lines: 118 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 12.73.132.148 Original-X-Trace: sv3-xKAaBXihafyTREaDzQ/a3ge0JLrfeJkzPxGD9Gq/u6WTHpKK9mlv12JuTCHGFdt0U0PhhnkGg7Y3Qnz!c7aBCauFMz2JdBUwYr4ceh3WAOb4IIXXmiECi4nfjfbdMjTY+OyiikvSQKt9hikaSLBOF5nUN6P/!2vs8eGVQ2vLDe64kHnw7Xq/xXfIwdq4= Original-X-Complaints-To: abuse@sysmatrix.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 X-Original-Bytes: 5993 Original-Xref: news.stanford.edu gnu.emacs.help:171692 comp.emacs:98539 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66858 Archived-At: 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 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/ >> >> ☄