zulip-terminal
zulip-terminal copied to clipboard
Change MOUSE_SELECTION_KEY to Fn + cmd
What does this PR do?
MOUSE_SELECTION_KEY is changed to Fn + cmd in MacOS platform
Testing
- [x] Manually
- [x] Passed linting & tests (each commit)
Commit changes
- MOUSE_SELECTION_KEY = "Fn + Alt" if PLATFORM == "MacOS" else "Shift"
+ MOUSE_SELECTION_KEY = "Fn + cmd" if PLATFORM == "MacOS" else "Shift"
Visual changes
Before

After

Changed to Fn+cmd is used to avoid confusion due to Mac keyboard layout
@neiljp Please check
I don't use a mac so this is difficult for me to confirm personally.
Which terminal emulators have you tested this on?
My understanding is that depending on the terminal emulator, eg. Terminal (built-in) or iTerm (app that some use), Alt/cmd may work differently, see for example https://github.com/zulip/zulip-terminal/issues/680#issuecomment-640977268
Are you about on chat.zulip.org?
If this does resolve this one particular case across terminals, more generally I'd like to combine this fix with a translation of the Meta which is necessary for urwid to understand, into something like physical_key_representing_meta() for user output (in platform_code.py), since Meta is not an available physical key in most cases.
Note that resolving the Mac (and cross-platform) situation properly would involve documenting the situation via #873, as well as ensuring we address points that have come up in topics that have come up in
- https://chat.zulip.org/#narrow/stream/206-zulip-terminal/topic/Alt.20.2F.20Meta.20keys
- https://chat.zulip.org/#narrow/stream/206-zulip-terminal/topic/About.20Popup.20.28alt.2Fmeta.29
@neiljp
- I have used the default
zshterminal for testing - I feel that key mapping for above problem is correct but instruction text is displayed wrong according to Mac keyboard layout since there is no
Altin it.
In case of documentation, I'll change the things accordingly
@Khushiyant I was referring to the application you're using to run zsh (which itself is a shell), so that doesn't quite answer my question.
@neiljp I have tested the change on Terminal(built-in, ver 2.12.7) and also on iTerm
Hello @zulip/server-hotkeys members, this pull request was labeled with the "area: hotkeys" label, so you may want to check it out!