Per-profile remapping of modifier keys

7 views
Skip to first unread message

Gulshan Singh

unread,
Sep 3, 2022, 7:28:48 PM9/3/22
to iterm2-discuss
Hi,

I'm able to use emacs in the terminal with the left command key as the emacs meta key by 1) having left option send Esc+ in Profiles -> Keys -> General and 2) making left command send left option in Keys -> Remap Modifiers.

But what I would like is to have left command mapped to left option on a per-profile basis, so that I could press a key to switch to a profile that had this configuration, or use the automatic profile switching settings. This would allow me to use the command key as normal outside of emacs (i.e. I want to press Cmd+C to copy outside of emacs, not Option+C), but still get the behavior I want when running emacs.

I figure there's probably a reason why remapping of the modifier keys isn't already a per-profile setting, but I couldn't find any discussion around this. Is there any workaround to achieve what I want?

George Nachman

unread,
Sep 20, 2022, 4:12:03 PM9/20/22
to iterm2-...@googlegroups.com
Sorry, I don’t think there’s a way to do this.

--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iterm2-discuss/7851322f-f262-42d2-821f-6ab6f180c2a6n%40googlegroups.com.

Gulshan Singh

unread,
Sep 20, 2022, 7:48:32 PM9/20/22
to iterm2-...@googlegroups.com
Thanks for the response George.

Mostly for my own curiosity, could you explain why this would be difficult to do? I'm wondering what the technical difference is between having command remapped globally versus in a profile.


You received this message because you are subscribed to a topic in the Google Groups "iterm2-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/iterm2-discuss/DeaXdAQovbo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to iterm2-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iterm2-discuss/CAB5Rqono1EB2KQAb4rJ_aOmjj60T2VZZKbXh6DaLJbt4%3D68hbw%40mail.gmail.com.

George Nachman

unread,
Sep 21, 2022, 1:22:36 AM9/21/22
to iterm2-...@googlegroups.com
I don’t think there’s any part of it that is technically challenging, but I’m unenthused about it because:

  1. It makes something that currently seems simple but is actually hard to reason about in practice into something that is much more complex and even harder to reason about.
  2. There are cases where the behavior will be weird. For example, if you remap cmd then cmd-` to switch windows will require different modifiers depending on which window is active.
  3. It is not frequently requested but it will add a chunk of new UI which makes the settings panel even more overwhelming. There’s always a tradeoff between value added and confusion created, and I’m not sure it’s worthwhile here.


Reply all
Reply to author
Forward
0 new messages