Emacs Meta Key in Terminal

I have gotten emacs to recognize my windows key as a Meta key by editing my xmodmap.
But when i run emacs in terminal I dont have a meta key.
Does anyone know a solution for this?
Last edited by Jabrick (2011-08-31 01:25:54)

I have lots of experience with various ways to map particular keyboards to emacs keys. I've been using emacs since around 1980. I understand emacs. I've been using emacs via tarantella for as long as Oracle has used tarantella to access remote hosts, something close to ten years. The way to type meta keys in emacs in a Windows environment is ALT-foo. It works both with SGD and running emacs locally on Windows. I would know if I had been typing ESC; I have not.
Douglas

Similar Messages

  • Use command key as meta key in terminal?

    I love my new mac pro, but there are some things that I don't want to deal with.
    Both the shell (tcsh) and editor (emacs) that I use rely heavily on the 'meta' key. I have found the option in the settings to use the "alt" as meta, but I would really prefer to use the command key as meta.
    Is there any way to configure 'terminal' to use the command key as meta, rather than the alt key?
    Thanks,
    -jamie

    Some more info-
    I only want to change the behavior of this key in terminal, if possible-
    I don't want to re-map the keys globally.

  • Making "apple" key the meta-key in terminal

    howdy,
    does anyone know how to assign "meta" functionality to the the "apple" button in the terminal?
    cocoa emacs does it by default and i know there's a preference pane to set the option key to meta ...
    i'd be much obliged if anyone could offer a solution.
    cheers!
    -ld

    Ah you mean the ESC key posting? That's what I've been using all these years as a workaround, but that is not a real solution.
    The ESC solution is different and more awkward to type than a real meta key. For one it is in an inconvenient location, and more importantly it's not used like a modifier key because you have to press and release it before typing the combination character. So instead of pressing and holding Meta, then typing the dot key, then releasing both (to get the last argument of the previous command line in bash for example), I have to press ESC, then release ESC and then type the dot. If I don’t do that, and hold the ESC key down, the repetition kicks in and that breaks key sequences.
    But I really want to press and hold meta, press the dot, and then release them both at once. Exactly like the combinations that you use with the Ctrl key, or the Mac keyboard commands you use with the Command key. I want to use the meta key like the Ctrl key, which is the natural way to use it. The ESC fallback is a less convenient substitute which we’re forced to use, unfortunately... But I hate it.
    So, if you know of a way to assign the meta role to some key other than the Option key in a way that allows me to use it like a real modifier key that can be held pressed without going into repetition, then that would be the solution I am looking for. And I guess the “other key” can pretty much only be Caps Lock or Fn.

  • Meta-key in terminal

    I am using a Macbook with a norwegian keyboard. The keyboard doesn't have
    symbols such as | or ~, so I have to use the Option key to produce them.
    In terminals, I have the ability to set Option to behave as a meta-key which gives
    me the full functionality of Emacs as well as meta-key combinations on the shell
    (e.g. Option + d to delete a word in a line of text). However, when I enable the
    Option-key as Meta-key, I cannot use Option key to produce e.g. | or ~.
    What I would like is a way to set another key as Meta-key... Caps lock would be
    nice, since I never really use it. I have tried DoubleCommand, fKeys etc, but none
    of these applications allow me to set a Meta-key. Is there a way to force this behaviour?

    Ah you mean the ESC key posting? That's what I've been using all these years as a workaround, but that is not a real solution.
    The ESC solution is different and more awkward to type than a real meta key. For one it is in an inconvenient location, and more importantly it's not used like a modifier key because you have to press and release it before typing the combination character. So instead of pressing and holding Meta, then typing the dot key, then releasing both (to get the last argument of the previous command line in bash for example), I have to press ESC, then release ESC and then type the dot. If I don’t do that, and hold the ESC key down, the repetition kicks in and that breaks key sequences.
    But I really want to press and hold meta, press the dot, and then release them both at once. Exactly like the combinations that you use with the Ctrl key, or the Mac keyboard commands you use with the Command key. I want to use the meta key like the Ctrl key, which is the natural way to use it. The ESC fallback is a less convenient substitute which we’re forced to use, unfortunately... But I hate it.
    So, if you know of a way to assign the meta role to some key other than the Option key in a way that allows me to use it like a real modifier key that can be held pressed without going into repetition, then that would be the solution I am looking for. And I guess the “other key” can pretty much only be Caps Lock or Fn.

  • Meta key won't work in emacs

    When I run emacs in the terminal I have to use the escape key as the meta key, even though I have "use option key as meta key" selected in the terminal options. Any suggestions?

    I'm not an emacs user, but I think mac-command-key-is-meta is not supported by the console version of emacs pre-installed in MacOSX.
    But,
    When I run emacs in the terminal I have to use the escape key as the meta key, even though I have "use option key as meta key" selected in the terminal options.
    This is strange. It works for me. If "use option key as meta key" is On, then "hitting option and V simultaneously" is equivalent to "hitting ESC and then V sequentially". If ESC V (two key strokes) works in your emacs (scroll back 1 page), then option-V (single key storke) should also work.
    Are you sure you are using the option (not command) key?
    Are you hitting the option key simultaneously with the other key?
    PowerMacG4, PowerBookG4, iMac(C2D)   Mac OS X (10.4.8)  

  • Problem with meta key option in Terminal app!

    I used Terminal for awhile now with and without meta-key option but I like the meta-key to be turned on cause im familair with tabbing that way. But one thing I can't do in like irssi, is to make symbols with altkey1234567890.. I can do that without the meya-key option.. Anyone know how to solve this problem?

    This seems a [long-standing|http://www.entropy.ch/blog/MacOSX/2009/01/27/Mac-OS-X-Problem-Unsolved-for-Years-Terminal-Meta-Key-and-Internati onal-Keyboards.html|Mac OS X Problem Unsolved for Years: Terminal Meta Key and International Keyboards] issue.
    A possible solution could be to find how to specify an arbitrary alternate key as the META key, for example the Caps Lock or Fn key.
    Another solution could be to tweak the shell to print the requested characters, even with the "use Option as the META key" option enabled. For what I understand, this route for the Bash shell is explained [here|http://anders.janmyr.com/2009/01/making-mac-os-x-terminal-hum.html|Making the Mac OS X Terminal Hum]. However, I don't know enough of *nix and shells to really understand what's written in that article… moreover, I use the tcsh shell and those instructions seems to me very shell-specific.
    Any idea of what needs to be tweaked in a tcsh shell environment?

  • Vim issues...meta keys and colorscheme not working correctly

    The first issue isn't really a vim problem, but it's related.  When running Vim in a terminal, my meta key bindings don't work.  I've tracked it down to a problem with Xfce's Terminal as noted here: http://vimdoc.sourceforge.net/htmldoc/m … p-alt-keys
    ...but I'm not sure exactly how to fix it.  I suppose I could always switch to another terminal, but I'd like to stick with Xfce's version if possible.
    The second issue is that my color scheme isn't being set when I first load up gVim.  As soon as I open a file, it properly displays, but the "splash" page doesn't show it.  I'm using desert (who doesn't) and this is what it looks like when I first load up gVim:
    I did stop using a separate <code>.gvimrc</code> in favor of putting everything in my <code>.vimrc</code> file under a conditional, and all the other settings work just fine.  Here's what that conditional looks like:
    if has( "gui_running" )
    set columns=84 " Set the window's width
    set lines=43 " Set the window's height
    set guioptions-=T " Remove the toolbar from the window
    set guifont=Terminus 12 " Use a clean monospaced font
    colorscheme desert
    else
    set background=dark
    colorscheme desert
    endif
    In case you're curious, here's my entire <code>.vimrc</code> file.

    phrakture wrote:IIRC this happens for because gvim does not find a ~/.gvimrc and reads /etc/gvimrc after ~/.vimrc (I think).
    Try symlinking ~/.vimrc to ~/.gvimrc
    That solved the problem for me. Thanks 

  • Meta key readline in aterm/Eterm

    I'm not certain if I can describe this.  I have the following in my ~/.inputrc:
    C-p: history-search-backward
    M-,: beginning-of-line
    That's Control-p and Alt-comma bound to two separate actions. When I use xterm, these keybindings (and others I have set -- these are just examples) work exactly the way they are supposed to (ie: as defined in the readline man page ).
    However, if I run them in aterm or Eterm, the first keybinding (using the control key) works fine, but the second one (using the Meta key) does not. I also tried it in rxvt on which these two terms are based. It seems like the alt key isn't being interpretted properly in these terms.
    However, the default readline keybindings that use alt (ie: Meta-f for word forward) seem to work fine. What the hell is up with this?
    I've tried setting various term variables, but didn't see any changes.
    Also, the HOME key, when pressed in aterm, just displays a ~, but it works fine in Eterm.
    I want a translucent terminal, but xterm is the only one that I can find that allows my preferred keybindings. :cry:
    Dusty

    i can confirm this in urxvt as well dusty,
    but strange is that my xterm doesn't work well either, it flipps out totally when trying out such things, weired,

  • Changing conkeror's meta key

    So, I've started using conkeror, which is a great browser for us who dislike the rodent. But the problem is that I'm also using wmii, and I like the Alt key, aka Mod1, being my wmii mod key. But conkeror likes that key too, and I really can't figure how to change the meta key (M-) in conkeror. Mod4, or the "Win-key" would be better for me. I understand some of you use conkeror too, so maybe someone could help me?

    I think Conkeror is great too, especially after I made a few minor keybinding tweaks.
    I looked all over and couldn't find the meta declaration either. The universal argument is easy enough to find, but not the meta. I changed my universal argument to be 'y', in addition to C-u, and added vim-like  j,k functionality for line up/down too, so my Conkeror is now a crazy emacs/vim mash-up
    I don't have the exact problem you do, but I did want to change a few of the meta commands. For example, in addition to the default M-n (buffer-next) I also added the same functionality to the 'a' key.
    define_key(default_global_keymap, "M-n", "buffer-next");
    define_key(default_global_keymap, "a", "buffer-next");
    Without an obvious global meta declaration, I suppose as an ugly hack you could just change all of the meta commands manually to something else.
    Bob

  • Could not generate stub object - The element type "META" must be terminated by the matching end-tag "".

    I am getting the following error message when I try invoking
    a webservice.
    Could not generate stub objects for web service invocation.
    Name: ProgrammePrivilege. WSDL:
    https://clientaccweb.reseaudistinction.com/CardHolderInfo.asmx?WSDL.
    org.xml.sax.SAXException: Fatal Error: URI=null Line=11: The
    element type "META" must be terminated by the matching end-tag "".
    It is recommended that you use a web browser to retrieve and
    examine the requested WSDL document for correctness. If the
    requested WSDL document can't be retrieved or it is dynamically
    generated, it is likely that the target web service has programming
    errors.
    The problem is, the webservice is working fine, the
    application was working yesterday, the error message just appears
    after a couple of days and I have to refresh the service in the CF
    Administrator. Once I refresh it, everything starts working again.
    Anyone else got this problem? ANY help would be appreciated!
    If you guys need my code anyway, I can attach it but like I
    said, everything works for a couple of days, then, out of the blue,
    it stops working so I doubt that it's my CFINVOKE that's the
    problem...

    Similar kind of problems here - reported back to Adobe a
    couple of months ago, so let's wait and hope for the best. My
    problems have related to registering multiple web services and
    executing them. One problem is that, If I register two identical
    (and quite complex) web services, I can only execute either of
    them. After CF restart, either of them works, but invoking the
    other doesn't work.
    For example; CF_Restart -> Try A first, A works -> B
    doesn't. Also, CF_Restart -> Try B first, B works -> A
    doesn't.
    CFMX7.0.2, Apache 2.2, WinXP

  • WHAT THE HELL IS THE META KEY!?!??!?!

    Hi guys,
    i am currently adding som Accelerators to my JMenus, can someone tell me what the meta key is?
    I tryed the windows key, or alt key.. but no luck so far...
    Appreciate all the help one can get.
    thx

    [http://en.wikipedia.org/wiki/Meta_key]

  • What is the Meta Key?

    Which key on the Windows keyboard corresponds to the "meta" modifier key?
    I assumed the "windows key" on the windows keyboard would register as the meta key, but it is not doing so. I want to have a KeyListener that consumes the windows key when it is pressed, and I thought that testing for isMetaDown() would be able to test if the windows key was pressed or not. It isn't. So does the meta key really correspond to some other key? If so, what can I do to test if the windows key was pressed?

    I don't know what the Meta key is. The only thing I can suggest is to write a simple program to test for it and then press every key on your keyboard until you get a "true" result.

  • How to emulate INSert  key (in Terminal.app)

    iBook keyboard have no INSert key. I am using it very often on PC because I like working in Terminal and using Midnight Commander (insert key is used there to selecting files).
    How to emulate this key in Terminal.app (like you can emulate other keys for example page down/up and so on with fnshitfarrows), or maybe you now how to define custom emulation rule of some key shortcut to get this key.
    I don't need INS key outside Terminal.app.

    Just found answer here: http://hints.macworld.com/article.php?story=20080122065954390
    In Terminal.app's Preferences, go to Settings and select Keyboard. Find the Key you want to replace -- in my case, F12 -- and change the default Action value to:
    \033[2~

  • [SOLVED] Identifier of Meta key in xkb/symbols

    Hi!  I used to swap CapsLock with Esc for better vim usability by just adding the following lines to xkb/symbols at the section corresponding to my layout:
    key <CAPS> { [ Escape, Escape, Escape, Escape ] };
    key <ESC> { [ CapsLock, CapsLock, CapsLock, CapsLock ] };
    (Maybe it was Escape in lower case but basically that just worked.)
    Now I'm on a chromebook with the Meta key in place of CapsLock and I can't find its identifier.  I tried <META> and <MOD4> with no success.  I don't think it's something chromebook specific as other applications correctly recognize the Meta key.
    Thanks for your help!
    Last edited by ysetdng (2014-07-03 12:45:50)

    OK got it!  The key identifier is <LWIN> and the function (to which I want to map <ESC>) is Meta_L.
    Last edited by ysetdng (2014-07-03 11:13:00)

  • Dwm - how to assign a second Meta key

    I'm using dwm and I'm trying to figure out how can I assign the Microsoft Menu key (or context menu key) as a second Meta key?
    I usually use ALT as the meta key. #define MODKEY Mod1Mask, however, I'm not sure if I can use as well the MS key. Thanks

    Head_on_a_Stick, that'd be for the "Windows" key, not the menu key.
    The menu key does not function as a modifier so it cannot be simply configured in dwm's config.h.  When a key is pressed dwm checks the key symbol sent from the x server, and the modifier mask of what modifiers were held while the key was pressed.  The menu key will never be included in the modifier mask, it will only be treated as a key in the eky symbol varaible for the event.  That is unless you make the X server treat is as a modifier with Xmodmap.
    You could map the menu key to one of the 'normal' mod keys, but others are are available that are generally not used (I'd suggest Mod5Mask).  Once mapped, you can just change your modkey in dwm's config.g to match.
    EDIT: I just reread you initial post - you say you want to use the menu key "as well".  Do you mean you'd like to switch between them, or have them both do the same thing?  If you want to switch, use Mod5 as suggested above.  If you want them to do the same thing, simply use Xmodmap to make the menu key a Mod1 key, then don't do anything to your config.h.
    Last edited by Trilby (2014-11-18 12:31:06)

Maybe you are looking for

  • How to work with 360 video?

    I am new to AE and am trying to work with a 360 equirectangular video I shot with a Freedom 360 and 6 go pros. Are there any tutorials on how to work with 360 spherical videos? Do I need to download additional plugins? Thank you, Phil

  • Javabeans in JSP

    When i use a javabean in my jsp it doesnt find my class, I need to put anything in web.xml?? Im using Tomcat 4.0 I have beans.jsp: <jsp:useBean id="languageBean" scope="page" class="LanguageBean">      <jsp:setProperty name="languageBean" property="*

  • Redraw a JPanel during runtime

    Hi there, Im trying to redraw a whole JPanel during runtime. So basically I have this panel: public JPanel panel1 = new JPanel() {      public void paintComponent(Graphics g) {            super.paintComponent(g); }That panel is added to my JFrame dur

  • Rental Process.

    Hi, In rental business wants month wise billing but some times due to breakdown of machine business wants day wise billing. How to configured in the system & how pricing will calculate day wise & month wise both. Example : confirm me how to calculate

  • Additional information: 3, Check errno.

    At present, our operating system shows no disk space shortage. Nonetheless, a trace file for an error reported in the alert log shows that there was no space left on a device over the weekend without identifying the device or an affected file. ORA-27