OS X meta key [$20] #252
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi, this term is so amazing. But I use emacs every day and there is a "Use Option as Meta key" in terminal.app preferences. I am wondering is there any way to do the same in this term?
Thanks for help and keep cool!
--- There is a **[$20 open bounty](https://www.bountysource.com/issues/25105523-os-x-meta-key?utm_campaign=plugin&utm_content=tracker%2F479407&utm_medium=issues&utm_source=github)** on this issue. Add to the bounty at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F479407&utm_medium=issues&utm_source=github).Can't use emacs without this.
@jordonbiondo we can use
Esc
for Meta, although it's deeply inconvenient to muscle memory.👍 to have this.
I would actually like to be able to remap the left command key to be meta. It's closer to the spacebar, and my muscle memory goes there for meta.
That bug is the reason why I can't use this app, although I like it better than Cathode...
This also is why I can't use this app. For emacs it's a harder requirement than just muscle-memory: I can't even type C-/ for Undo.
articuluxe: CTRL+SHIFT+_ (as in 'underscore'). It's actually a standard emacs keybinding which I use on machines where I don't have my custom configurations installed.
@tvilot - C-/ is also a standard Emacs binding (it's also functional on Bash, Zsh and any other place where Readline or compatible (zle etc.) is available.)
@jasonm23 I know. I was just mentioning the alternative.
Can we all here agree that this is "Cool Retro Term" and that we don't expect this thing to behave like a perfect terminal?
Thanks.
it's a very active project and it's better to simply
Talking as if this is a fixed or cannot fix issue is counter productive. If you don't expect or want a particular thing, that's fine, if others do, they should contribute and encourage contribution.
Let's remember this is software, AFAIC learning how to improve it is the entire point of it.
@jasonm23 oh, for godsakes. I was just answering a question.
#432 Does this meet your need?
@picospuch t's great. But the Command key still doesn't work?
@NightMachinary Use option as meta key as Terminal.app does, so that shift + command + c/v work as shortcuts to copy and paste correctly.
for your test, I have packaged a dmg. https://github.com/picospuch/cool-retro-term/releases/tag/TestForEmacs
for mac, instead of custom shortcuts for copy/paste/fullscreen..., we can use StandardKey.[whatever]. This leaves Modifiers untouched (I mean Shift, Alt & Ctrl) and use an event filter to handle those modifiers (and make the "meta" key switchable)
use a keymapper to remap the meta key to cool-retro-term
Hi, this term is so amazing. But I use emacs every day and there is a "Use Option as Meta key" in terminal.app preferences. I am wondering is there any way to do the same in this term?
@picospuch commented on Apr 29, 2018, 2:33 PM GMT+4:30:
Has this gotten merged? It worked just fine.
Judging from this pull request, this change was merged long ago, back in 2018: https://github.com/Swordfish90/cool-retro-term/pull/432
However, I have meta key problems in cool-retro-term 1.2.0 on macOS 11.6.1 (Big Sur). Pressing Option does not send
Metacorrect Meta combinations when combined with other keystrokes. Tapping Escape followed by another key does send a Meta key combination.In the fork release @picospuch made back in 2018 (https://github.com/picospuch/cool-retro-term/releases/tag/TestForEmacs) Option works as I would expect.
If the changes got merged, why does this problem still happen in the current release?
Ah - in version 1.2.0, Option does send the Meta keyboard modifier as desired.
However, it also triggers the standard OS X Option+letter custom character insertion logic. So, if you're in Emacs, Option+f doesn't send Meta-f - it instead sends Meta+ƒ.
I found this workaround of hacking the OS X keyboard layout that makes Option+[character] work as expected in
emacs -nw -q
, but even with that workaround, on multiple servers I use via SSH, Meta+f and Meta+b have no effect in Bash.Meta+f and Meta+b work in Bash on those servers via Terminal, the old known-to-work build of cool-retro-term (https://github.com/picospuch/cool-retro-term/releases/tag/TestForEmacs), and iTerm 2, without the above workaround.
I've just built
654f8d0761
locally and confirmed that Meta works as expected there, as well as confirming that a local build of HEAD does not.So, it should be possible to run a git-bisect and figure out what commit broke this.
My manual git bisect suggests that commit 28977313daab4c is the one where Option-as-meta starts breaking as I've described above.
By making some changes in the
qmltermwidget
project (which are available here), I've got a local build of the 1.2.0 tag that's almost working as I'd expect.Option+key combinations work correctly, but Option+Shift+key shortcuts still invoke OS X's special character insertion logic. As an example, the Emacs shortcut
M-x
works, but the shortcutM->
(jump to end of buffer) fails, as the fired key event has a character other than '>' due to the Option+Shift+. keybinding on macOS (it inserts ˘).I got the semi-working Option key behavior by reverting to an older version of some code, but the approach in that code seems like a workaround to me. There must be a better way to handle it.
I was having problems with Option+Arrow keys, but I've since gotten them to work, and I think this is what did the trick:
Use a custom command at startup to set cool-retro-term specific environment variables:
In your profile, set the
TERM
variable toxterm-256-color
for cool-retro-termSetting
TERM
got Option+Arrows to work so perhaps it will help with the rest of your shortcuts, I'm not sure.Edit: actually, I only have them working over SSH for some reason. I need to do some more digging.