* Re: Opt/Fn as meta? (emacs on macs) [not found] <E19EO8n-00029Y-03@monty-python.gnu.org> @ 2003-05-16 5:06 ` Matthew Calhoun 0 siblings, 0 replies; 11+ messages in thread From: Matthew Calhoun @ 2003-05-16 5:06 UTC (permalink / raw) El Friday, 9 May, 2003, a las 11:47 PM, help-gnu-emacs-request@gnu.org escribió: > > 1. Running in a Terminal (either gnuemacs or xemacs). Enable the > Emulation preference "Use option as meta key"... I'm using OS X's pre-installed emacs (gnu 21.1.1), and I've done this, but it's not working quite right. Commands that start with "C-" work fine, commands that start with "M-" work fine, but when I hold down both Ctrl and Meta, the Ctrl is ignored. For instance, if I try to run mark-sexp using C-M-@, Emacs interprets it as M-@, which is bound to mark-word. Using ESC C-@ instead seems to work fine, it's just a pain to type. Any ideas as to what might be wrong? Does anyone else using the same setup even see this behavior? I haven't been able to find any mention of it. Thanks, Matt ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <mailman.6287.1053063307.21513.help-gnu-emacs@gnu.org>]
* Re: Opt/Fn as meta? (emacs on macs) [not found] <mailman.6287.1053063307.21513.help-gnu-emacs@gnu.org> @ 2003-05-16 10:38 ` tristero 0 siblings, 0 replies; 11+ messages in thread From: tristero @ 2003-05-16 10:38 UTC (permalink / raw) In article <mailman.6287.1053063307.21513.help-gnu-emacs@gnu.org>, Matthew Calhoun wrote: >> 1. Running in a Terminal (either gnuemacs or xemacs). Enable the >> Emulation preference "Use option as meta key"... > > I'm using OS X's pre-installed emacs (gnu 21.1.1), and I've done this, > but it's not working quite right. Commands that start with "C-" work > fine, commands that start with "M-" work fine, but when I hold down > both Ctrl and Meta, the Ctrl is ignored. Unfortunately, yes, the meta emulation in Terminal is limited in the way you describe (and it's not specific to the emacs version). It works in combination shift but not in combination with control. I don't know of any way around this. ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <060520031719451942%ajanta@no.spam>]
[parent not found: <1a61f7e5.0305070021.5feb7ff6@posting.google.com>]
[parent not found: <bruce-B100FF.23050907052003@copper.ipg.tsnz.net>]
[parent not found: <m28ythmp8h.fsf@12-211-128-40.client.attbi.com>]
* Opt/Fn as meta? (emacs on macs) [not found] ` <m28ythmp8h.fsf@12-211-128-40.client.attbi.com> @ 2003-05-08 17:37 ` Sunder 2003-05-08 17:57 ` tristero ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Sunder @ 2003-05-08 17:37 UTC (permalink / raw) Joe Davison <halting@attbi.com> wrote: > Luckily, on both the carbon and x11 versions of emacs I use on my mac, > one can arrange it so either Cmd or Opt is Meta.. The Esc key is so small and so far on my powerbook that I am ready to try a different meta key. I want to understand how to do it, and if it can lead to any problems (I will be using Aqua as well as X11 programs). I think I'll leave Cmd alone as I see it being used elsewhere in the system a lot. OTOH I don't encounter any use for Opt or Fn. Questions: 1. Is there any downside to binding Opt or Fn as meta?. Both keys are placed equally conveniently for me, so I could just pick the less problematic one. 2. What would I put in my .emacs to make such a binding? S. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Opt/Fn as meta? (emacs on macs) 2003-05-08 17:37 ` Sunder @ 2003-05-08 17:57 ` tristero 2003-05-08 19:08 ` Kyle Jones 2003-05-08 22:28 ` Kevin Rodgers 2 siblings, 0 replies; 11+ messages in thread From: tristero @ 2003-05-08 17:57 UTC (permalink / raw) In article <080520031142459136%sunder_3291@hotmail.nospam>, Sunder wrote: > 1. Is there any downside to binding Opt or Fn as meta? Never causes me any problems to use Option. > 2. What would I put in my .emacs to make such a binding? There are three cases here, only one of which requires a .emacs change: 1. Running in a Terminal (either gnuemacs or xemacs). Enable the Emulation preference "Use option as meta key". You might also find it useful to enable "Option click to position cursor", which gives you some very basic mouse functionality. 2. Running the carbon gnuemacs. Here you want to add a line to .emacs: (setq mac-command-key-is-meta nil) The effect of this is to make Option act as Meta and Command act as Alt. For clarity you may want to conditionalize this to (eq window-system 'mac). But it's not strictly necessary to do so. 3. Running in X11 (either gnuemacs or xemacs). Here you need to change the X11 modmap. I put the following in ~/.Xmodmap: clear mod1 keycode 66 = Meta_L keycode 63 = Mode_switch add mod1 = Meta_L As in case (2), the effect of this is to make Option be Meta and Command be Alt. NB: the keycode values could well be specific to the Apple Pro keyboard. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Opt/Fn as meta? (emacs on macs) 2003-05-08 17:37 ` Sunder 2003-05-08 17:57 ` tristero @ 2003-05-08 19:08 ` Kyle Jones 2003-05-08 22:28 ` Kevin Rodgers 2 siblings, 0 replies; 11+ messages in thread From: Kyle Jones @ 2003-05-08 19:08 UTC (permalink / raw) Sunder <sunder_3291@hotmail.nospam> wrote: > Joe Davison <halting@attbi.com> wrote: > > Luckily, on both the carbon and x11 versions of emacs I use on my mac, > > one can arrange it so either Cmd or Opt is Meta.. > > The Esc key is so small and so far on my powerbook that I am ready to > try a different meta key. I want to understand how to do it, and if it > can lead to any problems (I will be using Aqua as well as X11 > programs). An alternative I use is to type ESC as Ctrl-[. I started doing this many years ago because ESC is one of those keys vendors love to move. It will feel odd at first but you will soon because accustomed to it. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Opt/Fn as meta? (emacs on macs) 2003-05-08 17:37 ` Sunder 2003-05-08 17:57 ` tristero 2003-05-08 19:08 ` Kyle Jones @ 2003-05-08 22:28 ` Kevin Rodgers 2003-05-09 7:40 ` Stephen J. Turnbull 2 siblings, 1 reply; 11+ messages in thread From: Kevin Rodgers @ 2003-05-08 22:28 UTC (permalink / raw) Sunder wrote: > The Esc key is so small and so far on my powerbook that I am ready to > try a different meta key. I want to understand how to do it, and if it > can lead to any problems (I will be using Aqua as well as X11 > programs). Remember that Esc and Meta are fundamentally different, even in a default X11 configuration: Meta is a modifier key (like Ctrl or Alt) that is pressed simultaneously with another key, whereas Esc is a prefix key that is pressed before another key (in order to simulate the Meta-modified key). -- <a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a> ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Opt/Fn as meta? (emacs on macs) 2003-05-08 22:28 ` Kevin Rodgers @ 2003-05-09 7:40 ` Stephen J. Turnbull 2003-05-09 10:35 ` Ajanta 0 siblings, 1 reply; 11+ messages in thread From: Stephen J. Turnbull @ 2003-05-09 7:40 UTC (permalink / raw) >>>>> "Kevin" == Kevin Rodgers <ihs_4664@yahoo.com> writes: Kevin> Remember that Esc and Meta are fundamentally different, Kevin> even in a default X11 configuration: Meta is a modifier key Kevin> (like Ctrl or Alt) that is pressed simultaneously with Kevin> another key, whereas Esc is a prefix key that is pressed Kevin> before another key (in order to simulate the Meta-modified Kevin> key). I wish that were true. Unfortunately, it is not. ESC-as-Meta behaves somewhat like (setq modifier-keys-are-sticky t). It does not work the way other prefix keys do. It is special-cased at a very low level. I can say that Kyle's approach of using Ctrl-[ will definitely work as desired.[1] If you do any manipulation of the ESC key (eg, with xmodmap or whatever Apple uses to define the keycode to keysym mapping), you need to be very careful that the effect is identical to physically reconnecting the "wires" to the ESC key to a different one. Footnotes: [1] On second thought, just trust Kyle, don't worry about what I say. ;-) -- Institute of Policy and Planning Sciences http://turnbull.sk.tsukuba.ac.jp University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN Ask not how you can "do" free software business; ask what your business can "do for" free software. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Opt/Fn as meta? (emacs on macs) 2003-05-09 7:40 ` Stephen J. Turnbull @ 2003-05-09 10:35 ` Ajanta 2003-05-09 10:32 ` tristero 0 siblings, 1 reply; 11+ messages in thread From: Ajanta @ 2003-05-09 10:35 UTC (permalink / raw) Stephen J. Turnbull <stephen@xemacs.org> wrote: > I wish that were true. Unfortunately, it is not. ESC-as-Meta behaves > somewhat like (setq modifier-keys-are-sticky t). It does not work the > way other prefix keys do. It is special-cased at a very low level. > > I can say that Kyle's approach of using Ctrl-[ will definitely work as > desired.[1] If you do any manipulation of the ESC key (eg, with xmodmap > or whatever Apple uses to define the keycode to keysym mapping), you > need to be very careful... Ctrl-[ trick is certainly nice. But I would also like to try defining Option as Meta. What is the .emacs command for this? Thanks. (BTW, there is a very nifty unitity called Ucontrol which lets you redefine keys at the OS level. The original motivation was to do something useful with Caps Lock. However, OSX has no sense of emacs's meta, so I can't use Ucontrol for this purpose.) ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Opt/Fn as meta? (emacs on macs) 2003-05-09 10:35 ` Ajanta @ 2003-05-09 10:32 ` tristero 2003-05-09 14:10 ` Rodney Sparapani 0 siblings, 1 reply; 11+ messages in thread From: tristero @ 2003-05-09 10:32 UTC (permalink / raw) In article <090520030440528694%ajanta@no.spam>, Ajanta wrote: > But I would also like to try defining > Option as Meta. What is the .emacs command for this? Thanks. I just posted a description of this for all three osx emacs "window-systems" (terminal, carbon/aqua, x11) yesterday. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Opt/Fn as meta? (emacs on macs) 2003-05-09 10:32 ` tristero @ 2003-05-09 14:10 ` Rodney Sparapani 2003-05-09 16:40 ` tristero 0 siblings, 1 reply; 11+ messages in thread From: Rodney Sparapani @ 2003-05-09 14:10 UTC (permalink / raw) tristero wrote: >In article <090520030440528694%ajanta@no.spam>, Ajanta wrote: > > >>But I would also like to try defining >>Option as Meta. What is the .emacs command for this? Thanks. >> >> > >I just posted a description of this for all three osx emacs >"window-systems" (terminal, carbon/aqua, x11) yesterday. > > > > > Huh. Where did you post that? I found a nice review of ssh, but nothing about keys. In any case, I think the answer to the original question (assuming GNU Emacs 21) is the first line of the following (I through in some definitions for F1 and the cmd key): ;Mac keys (setq mac-command-key-is-meta nil) (global-set-key (quote [f1]) 'help-command) (global-set-key [?\A-v] 'yank) ; paste (global-set-key [?\A-x] 'kill-region) ; cut (global-set-key [?\A-c] 'kill-ring-save) ; copy -- Rodney Sparapani Medical College of Wisconsin Sr. Biostatistician Patient Care & Outcomes Research rsparapa@mcw.edu http://www.mcw.edu/pcor Was 'Name That Tune' rigged? WWLD -- What Would Lombardi Do ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Opt/Fn as meta? (emacs on macs) 2003-05-09 14:10 ` Rodney Sparapani @ 2003-05-09 16:40 ` tristero 0 siblings, 0 replies; 11+ messages in thread From: tristero @ 2003-05-09 16:40 UTC (permalink / raw) In article <3EBBB6D5.2000803@mcw.edu>, Rodney Sparapani wrote: > tristero wrote: > >>In article <090520030440528694%ajanta@no.spam>, Ajanta wrote: >> >> >>>But I would also like to try defining >>>Option as Meta. What is the .emacs command for this? Thanks. >>> >>I just posted a description of this for all three osx emacs >>"window-systems" (terminal, carbon/aqua, x11) yesterday. >> > Huh. Where did you post that? Earlier in this thread. Here it is again: There are three cases here, only one of which requires a .emacs change: 1. Running in a Terminal (either gnuemacs or xemacs). Enable the Emulation preference "Use option as meta key". You might also find it useful to enable "Option click to position cursor", which gives you some very basic mouse functionality. 2. Running the carbon gnuemacs. Here you want to add a line to .emacs: (setq mac-command-key-is-meta nil) The effect of this is to make Option act as Meta and Command act as Alt. For clarity you may want to conditionalize this to (eq window-system 'mac). But it's not strictly necessary to do so. 3. Running in X11 (either gnuemacs or xemacs). Here you need to change the X11 modmap. I put the following in ~/.Xmodmap: clear mod1 keycode 66 = Meta_L keycode 63 = Mode_switch add mod1 = Meta_L As in case (2), the effect of this is to make Option be Meta and Command be Alt. NB: the keycode values could well be specific to the Apple Pro keyboard. ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2003-05-16 10:38 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <E19EO8n-00029Y-03@monty-python.gnu.org> 2003-05-16 5:06 ` Opt/Fn as meta? (emacs on macs) Matthew Calhoun [not found] <mailman.6287.1053063307.21513.help-gnu-emacs@gnu.org> 2003-05-16 10:38 ` tristero [not found] <060520031719451942%ajanta@no.spam> [not found] ` <1a61f7e5.0305070021.5feb7ff6@posting.google.com> [not found] ` <bruce-B100FF.23050907052003@copper.ipg.tsnz.net> [not found] ` <m28ythmp8h.fsf@12-211-128-40.client.attbi.com> 2003-05-08 17:37 ` Sunder 2003-05-08 17:57 ` tristero 2003-05-08 19:08 ` Kyle Jones 2003-05-08 22:28 ` Kevin Rodgers 2003-05-09 7:40 ` Stephen J. Turnbull 2003-05-09 10:35 ` Ajanta 2003-05-09 10:32 ` tristero 2003-05-09 14:10 ` Rodney Sparapani 2003-05-09 16:40 ` tristero
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).