Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change MOUSE_SELECTION_KEY to Fn + cmd #1267

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Khushiyant
Copy link
Collaborator

What does this PR do?

MOUSE_SELECTION_KEY is changed to Fn + cmd in MacOS platform

Testing

  • Manually
  • 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
Screenshot 2022-10-19 at 1 28 09 PM

After
Screenshot 2022-10-19 at 1 29 29 PM

Changed to Fn+cmd is used to avoid confusion due to Mac keyboard layout

@zulipbot zulipbot added the size: XS [Automatic label added by zulipbot] label Oct 19, 2022
@Khushiyant
Copy link
Collaborator Author

@neiljp Please check

@neiljp
Copy link
Collaborator

neiljp commented Oct 19, 2022

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 #680 (comment)

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

@Khushiyant
Copy link
Collaborator Author

@neiljp

  • I have used the default zsh terminal 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 Alt in it.

In case of documentation, I'll change the things accordingly

@neiljp
Copy link
Collaborator

neiljp commented Oct 21, 2022

@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.

@Khushiyant
Copy link
Collaborator Author

@neiljp I have tested the change on Terminal(built-in, ver 2.12.7) and also on iTerm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: XS [Automatic label added by zulipbot]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants