Menu

#114 Command key as Meta key

Soonish
open
None
7
2009-09-30
2003-03-20
Anonymous
No

Please add an option to set the command key as meta key. I understand this will disable menu hotkeys and such, but I've gotten so used to the command key as meta key that I invariably close windows when running emacs, which hurts.

Thanks!

Discussion

  • Nobody/Anonymous

    Logged In: NO

    My email address is jkATsupplysolution.com.

     
  • Nobody/Anonymous

    Logged In: NO

    I would like to add my vote for this one. Frankly, once you
    get your terminal emulation set up (i.e. transparency etc.)
    I find that I rarely use the hotkeys of command-w, command-N.

    Perhaps the solution would be to add 'swap command and option'.

    steven <AT> obsidiansunrise.net

     
  • Mark D. Anderson

    Logged In: YES
    user_id=570

    I too would love this feature.
    emacs (21.3.50, not the one that ships with mac os) will treat command
    as meta if you ask it to. But I can't do everything I want under the emacs
    shell mode;
    sometimes i want a real terminal.
    But none of the existing terminal emulators (Terminal, glterm, iterm, etc.)
    offer this.
    osx does offer alternative keyboard layout definitions in xml, but i don't
    want
    to remap the keyboard, i just want certain apps to intercept command.

     
  • Nobody/Anonymous

    Logged In: NO

    gnufoo.org's uControl offers a way to swap any modifier key
    (including caps lock) with any other modifier key. I use it
    to make the enter key on my PBG4 into another Function key.
    (very handy for lefties like me)

     
  • Nobody/Anonymous

    Logged In: NO

    alt-ctrl as a meta-key would work great!

     
  • Nobody/Anonymous

    Logged In: NO

    I do hope so!

     
  • Brian Lalor

    Brian Lalor - 2003-09-16

    Logged In: YES
    user_id=16756

    I'll voice my support for this config option. As a Linux, Emacs and
    bash user for the last 10 years, I find myself cursing every time I
    try to skip forward or back a word in the shell using iTerm.

    Pretty please?

     
  • Nobody/Anonymous

    Logged In: NO

    YES PLEASE !! Command-key (or better left command-key) to META would help all
    those who come from a PC keyboard and will never relearn typing

    option to meta is also good, but then I have no option key left (need that for
    some special chars), I mapped the return key to option (uControl) but if I use
    Option as Meta, return will also be Meta.

    The thing is: I NEED return as option in osx (not only iTerm), so I done this via
    uControll, now it would be very nice to have a Meta-key in iTerm left to the
    spacebar (cmd or opt), but only there (not touching the right cmd, or the
    remapped return(now opt) key )

    where can I donate, and how much it will cost ?
    itsf@seb.exse.net

     
  • Don Garrett

    Don Garrett - 2005-01-15

    Logged In: YES
    user_id=282051

    I want to add another vote for this.

    Constantly closing windows on remote machines is my only
    problem with Terminal.app, but it's bad enough to make me go
    looking for an alternative. I'm going to grab source and see
    if I can figure it out, but I haven't done much OS X
    development yet.

     
  • Matt Kangas

    Matt Kangas - 2005-05-05

    Logged In: YES
    user_id=218081

    +1

    This would a really handy feature to have.

     
  • Nobody/Anonymous

    Logged In: NO

    I agree! Please at least make this an option. I realize it
    would break Apple's UI guidelines, so don't enable it by
    default, but at least give us the option.

    I'm used to Meta being right next to the spacebar. Not sort
    of near the spacebar, but right next to it. It kills me to
    not be able to move forward and backward by a word with
    Command-f and Command-b in a shell or in Emacs.

    C'mon, please throw all us Unix geeks converting to Mac a
    little help. :)

     
  • Nobody/Anonymous

    Logged In: NO

    Holy Cow! How can this be open for 3 years with no hint of a resolution? This is a HUGE deal - please add this feature. Pretty Please.

     
  • Nathan Corvino

    Nathan Corvino - 2007-01-19

    Logged In: YES
    user_id=1696487
    Originator: NO

    This is a critical feature for avid shell users--I can't understand how people developing a terminal program cannot be going insane that it isn't working. Every time I try to hit meta-> to get to the end of a document, I want to pull my teeth out :). Some menu shortcuts need to still be available, such as new tab, close tab, copy, and paste. It would be fine if these worked off alt, such as alt-t, alt-w, alt-c, etc. But being able to do meta-f, meta-b, meta->, meta-< and the like is just critical--not to mention how broken things become when opening a terminal version of Emacs. Speaking of which, Emacs on OS X does this properly, so they might server as a good example to follow.

     
  • Daniel Quinlan

    Daniel Quinlan - 2007-01-26

    Logged In: YES
    user_id=3920
    Originator: NO

    This is the feature I dream about in a terminal application. I slog through
    my day using X11 "xterm".

    My ideal functionality is this:

    Command (Apple) key is mapped to meta. Ideally, it would be possible to *selectively*
    allow a few command keys to function normally (mostly command-c and command-v, although
    I can see times when I would not want pure-meta without those keys).

    Note: I don't want option as meta key, I want command. If you are a hard-core emacs
    user, then it's impossible to escape the muscle memory that demands the key next to
    space is the meta key.

    Anyhow, this would get me running iterm.

     
  • Nobody/Anonymous

    Logged In: NO

    This is a critical feature. At least GLTerm can be customized to make the command-key (aka apple key) behave as meta (by editing the keys.txt in the application package). It would be cool to have iterm as an alternative.

     
  • Diedrich Vorberg

    Logged In: YES
    user_id=442849
    Originator: NO

    I too would like to opt for this, it would be really cool!

     
  • blastura

    blastura - 2007-10-18

    Logged In: YES
    user_id=1916093
    Originator: NO

    This feature would really make iterm the best terminal out there for osx. I've been waiting a long time for this feature, please add it in next release. For emacs and for word forward/backward in bash, this is crucial.

    Best regards / Anton

     
  • Kevin Brubeck Unhammer

    Logged In: YES
    user_id=1217499
    Originator: NO

    +1

    This is a must-have. I hate having to press Esc-b just to move left one word (not to mention Emacs w/o meta..ugh)

    In Terminal.app, the only way of having meta is by losing the option key, which makes it impossible to type |, ~ or \ on my keyboard, seriously! Not gonna happen.

    Having a Mac terminal program with a _configurable_ meta key would be heaven. Just... make it an option.. left-command, right-command, Fn, ctrl, caps, right-shift, whatever..

     
  • James Bunton

    James Bunton - 2009-09-29
    • milestone: --> Soonish
    • assigned_to: nobody --> delx
     
  • James Bunton

    James Bunton - 2009-09-30
    • priority: 5 --> 6
     
  • James Bunton

    James Bunton - 2009-09-30
    • priority: 6 --> 7
     
  • rob giardina

    rob giardina - 2010-07-29

    The patch URL has been taken down. I contacted Diedrich and he shared the patch:

    diff iTerm/PTYSession.m iTerm.META/PTYSession.m
    535c535
    < if (NSF1FunctionKey<=unicode&&unicode<=NSF35FunctionKey)
    ---
    > if (NSF1FunctionKey <= unicode&&unicode<=NSF35FunctionKey)
    550,551c550,556
    < else if ((modflag & NSAlternateKeyMask) &&
    < ([self optionKey] != OPT_NORMAL))
    ---
    > else if (modflag & NSCommandKeyMask)
    > {
    > send_str = (unsigned char*)strdup("\x1b ");
    > send_strlen = 2;
    > send_str[1] = (unsigned char)unicode;
    > }
    > else if ((modflag & NSAlternateKeyMask) && ([self optionKey] != OPT_NORMAL))
    555a561
    >
    560a567
    >
    diff iTerm/iTermApplication.m iTerm.META/iTermApplication.m
    59c59
    < if([currentSession hasKeyMappingForEvent: anEvent highPriority: YES])
    ---
    > if([currentSession hasKeyMappingForEvent: anEvent highPriority: YES] || [anEvent modifierFlags] & NSCommandKeyMask)

     

Log in to post a comment.