Open
Description
Environment
PS version: 7.2.0-preview.3
PSReadline version: 2.2.0-beta2
os: Darwin mmomalife.northamerica.corp.microsoft.com 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
PS file version: 7.2.0.0
HostName: ConsoleHost
BufferWidth: 381
BufferHeight: 94
By default 2.2-beta2 binds Alt+h to ShowParameterHelp, but Alt+h
on macOS prints Unicode 0xCB99 instead of calling the key handler. There is already an issue with .NET in not catching some keyboard combinations correctly on Unix systems. For now, it may make sense to pick a different default binding that works on Windows and Linux/macOS. Perhaps F2?
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
daxian-dbw commentedon Feb 24, 2021
@theJasonHelmick and I had a discussion about this on Monday. We thought about choosing a different key binding, but decided to postpone the change.
It works fine on Linux, but not on macOS because of #1075. There are many existing default bindings today using combination keys with
Alt
, and all of them are not working on macOS. So we should fix #1075 as it's the root cause. But I'm fine that we choose different default binding for parameter help. F2 is already taken, to switch between prediction views.[-]ShowParamterHelp is bound to Alt+h by default which doesn't work on macOS (maybe Linux as well)[/-][+]ShowParamterHelp is bound to Alt+h by default which doesn't work on macOS[/+]adityapatwardhan commentedon Feb 24, 2021
How about
Ctrl+F1
. Still related toF1
so keeps the help chords together?theJasonHelmick commentedon Feb 24, 2021
The same problem exists with ALT-a as well - any ALT key combinations on MAc. I have remapped them as Ctrl-L and Ctrl-k. I'm not recommending these mappings, but more to @adityapatwardhan point - I think that loading up the function keys with ctrl options might not work well - as a Mac user, one method of accessing the function keys is to press
Fn
+ the function key - this would make itFn
+Ctrl
+F1
- which is a stretch.mklement0 commentedon Feb 1, 2023
It's not ideal, but a one-time configuration of the macOS terminal apps makes the
Alt
-based shortcuts work:See #1075 (comment)
andyleejordan commentedon Feb 1, 2023
Edit: Oops yeah exactly what @mklement0 linked to! Sorry didn't read, it was just the notification that pulled me over lol.
Have you all tried setting "Use option as meta key" in macOS's terminal settings? This works for me, been doing it since 2012 to get all my
Alt-
combos in terminal Emacs working 😆mklement0 commentedon Feb 1, 2023
Thanks, @andschwa, let me just duplicate the info from the linked comment for convenience here, so as to also cover iTerm2 users:
Preferences > Profiles > (profile of interest) > Keys > Left Option key: / Right Option key:
Choose
ESC+
.