[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: S-tab translated to C-y on a mac?
From: |
Daniel Pittman |
Subject: |
Re: S-tab translated to C-y on a mac? |
Date: |
Mon, 18 Oct 2010 23:32:31 +1100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) |
Andrea Crotti <andrea.crotti.0@gmail.com> writes:
> Daniel Pittman <daniel@rimspace.net> writes:
[... I reported that Cocoa GUI MacOS-X 23 translates S-tab into C-y
automatically, and wondered how to avoid that ... ]
>> This is all (relatively) native GUI stuff. :)
>
> +1, I always had the same issue, but I didn't recognize the problem
> before since I almost always use the mac version...
So, since I am not the only person who cares: I went looking, and found two
things:
First, the translation is stored in a *copy* of `ns-alternatives-map',
accessible only between the `local-function-key-map' and its parent, injected
there during frame setup.
This will remove the initial translation:
(define-key (keymap-parent local-function-key-map) [S-tab] nil)
I don't see why that keymap is cloned, but whatever.
Second, if I just add this my binding actually works:
(global-set-key [S-tab] #'tab-to-tab-stop)
...so, my problem is solved. :)
Daniel
--
✣ Daniel Pittman ✉ daniel@rimspace.net ☎ +61 401 155 707
♽ made with 100 percent post-consumer electrons