8000 key-mappings with `alt` don't suppress Mac OS composition characters anymore (atom-1.19) · Issue #15189 · atom/atom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

key-mappings with alt don't suppress Mac OS composition characters anymore (atom-1.19) #15189

Closed
1 task done
despairblue opened this issue Aug 8, 2017 · 12 comments · Fixed by #15314
Closed
1 task done
Labels
mac Issues that occur on macOS but not on other platforms. regression triaged

Comments

@despairblue
Copy link
despairblue commented Aug 8, 2017

Prerequisites

Description

Shortcuts with alt don't suppress Mac OS composition characters.

Steps to Reproduce

With ABC - Extended keyboard layout:

  1. Open Your Keymap
  2. Add the following keymaps:
# general
'atom-text-editor':
  # use jkl; vim-like when pressing alt (word by word, paragraph by paragraph)
  # or alt (letter by letter)
  'alt-h': 'core:move-left'
  'alt-j': 'core:move-down'
  'alt-k': 'core:move-up'
  'alt-l': 'core:move-right'
  1. save
  2. try to use them

With US keyboard layout /cc #15189 (comment).

Expected behavior: [What you expect to happen]

A GIF from atom-1.18

atom-1 18

Actual behavior: [What actually happens]

A GIF from atom-1.19

atom-1 19

Reproduces how often: [What percentage of the time does it reproduce?]

Always.

Versions

  • Atom: 1.19.0-beta7
  • Atom-Shell:
  • OS: Mac OS X 10.12.5
  • Misc
    • apm 1.18.2
    • npm 3.10.10
    • node 6.9.5 x64
    • python 2.7.10
    • git 2.11.0

Additional Information

Probably only happens on Mac OS.

@rsese
Copy link
Contributor
rsese commented Aug 8, 2017

Hmmm, I gave this a try on 1.19.0-beta7 but can't reproduce - tagging as needs repro for now.

Also about your steps to reproduce, based on your GIFs, seems like this:

'alt-shift-J': 'block-travel:move-down'
'alt-shift-K': 'block-travel:move-up'

should be this?

'alt-shift-J': 'core:move-down'
'alt-shift-K': 'core:move-up'

@despairblue
Copy link
Author

@rsese sorry I copied the wrong keymaps (the shortcuts as well as the commands), I updated the original post. 😄

Thanks for pointing that out. Could you try again with that setup?

@rsese
Copy link
Contributor
rsese commented Aug 9, 2017

Np thanks 👍 I tried with the updated keybindings and it still works ok for me with the latest releases (1.19.0 and 1.20.0-beta0). Have you tried with the latest versions that went out yesterday?

@despairblue
Copy link
Author

@rsese Thanks for your time. I just tested both and the characters are still not suppressed when a key mapping is triggered.

Are you testing this on a Mac? What keyboard layout are you using? I'm using ABC - Extended and pressing alt-{h,j,k,l} leads to ˍ˝˚- being printed in input fields like this textedit on github.

Problem is that they used to be suppressed if a key mapping is triggered, probably by something like event.preventDefault() which would lead to the key event not propagating to the system, but since the C++ editor buffer implementation this does not happen anymore and the event is propagated to the system no matter what.

@despairblue
Copy link
Author

I changed my layout to US - International and now it works. I think the difference is that now alt-{h,j,k,l} are not mapped to composition characters anymore: ∆˚¬…

I can reproduce this with this mapping using a US layout:

  'alt-u': 'core:move-down'

alt-u is used for creating umlaute like ü, ä, ö.

@Ben3eeE
Copy link
Contributor
Ben3eeE commented Aug 10, 2017

Related: atom/atom-keymap#190

@rsese
Copy link
Contributor
rsese commented Aug 10, 2017

Ahhh yes, I'm using US layout and I can reproduce with alt-u like you described.

Just to confirm, do you think this is its own issue @Ben3eeE vs. a dupe of atom/atom-keymap#190?

@Ben3eeE Ben3eeE added the mac Issues that occur on macOS but not on other platforms. label Aug 11, 2017
@Ben3eeE
Copy link
Contributor
Ben3eeE commented Aug 11, 2017

I think this is it's own issue. Just referencing it because both issues are about alt- variants on macOS inserting the character when it should not.

I can not reproduce this on Windows using AltGraph modified bindings.

@despairblue
Copy link
Author

Thanks for helping to reproduce this 🙂

Then I think the needs-reproduction label can be removed.

@despairblue
Copy link
Author

@nathansobo Thanks for the work around, sadly this only prevents the composition character from being rendered, it will still compose:

alt composition

Versions

  • Atom: 1.19.1
  • Atom-Shell:
  • OS: Mac OS X 10.12.5
  • Misc
    • apm 1.18.4
    • npm 3.10.10
    • node 6.9.5 x64
    • python 2.7.10
    • git 2.11.0

@Ben3eeE Ben3eeE reopened this Aug 15, 2017
@Ben3eeE
Copy link
Contributor
Ben3eeE commented Aug 15, 2017

/cc: @as- 8000 cii I can't test this because it is macOS specific.

@lock
Copy link
lock bot commented Mar 31, 2018

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

@lock lock bot locked and limited conversation to collaborators Mar 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
mac Issues that occur on macOS but not on other platforms. regression triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
0