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

new mnemonics behavior #56617

Merged
merged 4 commits into from
Aug 17, 2018
Merged

new mnemonics behavior #56617

merged 4 commits into from
Aug 17, 2018

Conversation

sbatten
Copy link
Member

@sbatten sbatten commented Aug 17, 2018

Please try out the new behavior and let me know what you think. After this is in, I'll need to go back in and make the screen reader stuff work correctly.

This removes the dependency on accessKey which limits us from controlling the behavior.

fix #52368
fixes #52935
fixed #53071
close #53609
closes #53654
closed #53767
resolve #54232
resolves #54822
resolved #55540
fix #55681

@sbatten sbatten added this to the August 2018 milestone Aug 17, 2018
@sbatten sbatten self-assigned this Aug 17, 2018
@sbatten sbatten requested a review from bpasero August 17, 2018 01:15
Copy link
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did some testing (not a full code review) and found 2 issues so far:

  • when you press Alt+F I would expect pressing O works but I need another Alt+O
  • when you press Alt+F I would expect arrow up and down to navigate in the menu but it does not (focus missing?)

@sbatten
Copy link
Member Author

sbatten commented Aug 17, 2018

@bpasero neither of those issues are expected or repro for me. I'm not sure what is happening for you.

@bpasero
Copy link
Member

bpasero commented Aug 17, 2018

@sbatten ok, could be a VM issue then (I do not have a Windows machine right now). Maybe you merge and I try again next week.

@sbatten
Copy link
Member Author

sbatten commented Aug 17, 2018

@bpasero I will merge these changes, but please do a complete code review on Monday. @JacksonKearl I played with it on several machines and had Jackson play with it on his machine as well.

@sbatten sbatten merged commit 1db4cac into master Aug 17, 2018
@JeffHanna
Copy link

JeffHanna commented Aug 18, 2018

I don't know if I'm supposed to test with today's build or tomorrow's, but the behavior, at least for me, is not what I would expect on Windows. Alt+<key> works to open a menu and the arrow keys navigate the menu, but a second Alt+<key> must be entered for the menu command to work. For instance, the menu command File\Exit is Alt+F, Alt+X, where it should be Alt+F, X. This makes saving untenable as Alt+F, Alt+S is interpreted as, "Open the File Menu. Now open the Selection Menu.", not "Open the file menu and save."

Version: 1.27.0-insider
Commit: b00ab52
Date: 2018-08-16T09:38:37.976Z
Electron: 2.0.7
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

@sbatten
Copy link
Member Author

sbatten commented Aug 18, 2018

@JeffHanna these bits are not yet available in insiders, but will be in the next build

@bpasero
Copy link
Member

bpasero commented Aug 20, 2018

@sbatten I can still reproduce this issue (on my real Windows machine): press Alt+F and then release all keys, then press any of the mnemonics that is underlined (e.g. O), it will not work.

@sbatten
Copy link
Member Author

sbatten commented Aug 20, 2018

@bpasero I've a feeling this may be an issue with keyboard layout or similar. If you aren't using a US layout can you try it on a US layout to confirm? If you are using a US layout, can you confirm your version is at least: Version: 1.27.0-insider
Commit: 6e55926
Date: 2018-08-20T08:36:52.887Z
Electron: 2.0.7
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

@JeffHanna
Copy link

Just to confirm this is working as expected for me now. Thanks for addressing the issue.

Version: 1.27.0-insider
Commit: 6e55926
Date: 2018-08-20T08:36:52.887Z
Electron: 2.0.7
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

@bpasero
Copy link
Member

bpasero commented Aug 21, 2018

@sbatten well it would be pretty bad if this would only work with a US keyboard layout? Can you try switching yours to German to see if its really that?

@bpasero
Copy link
Member

bpasero commented Aug 21, 2018

@sbatten weird, now with todays insider I cannot reproduce this anymore. I still do not see focus in the first menu item, but that seems to be a VM issue.

@sbatten
Copy link
Member Author

sbatten commented Aug 21, 2018

@bpasero glad its working now, but for the focus thing, im seeing the same, may have missed a Boolean in the listener. fixing.

@JackTrapper
Copy link

Steps to Reproduce

  • Press Alt
  • Press F
  • Release F
  • Press S (no save)
  • Release S
  • Release Alt

Alternate steps to reproduce

  • Press Alt
  • Press F
  • Press S (no save)
  • Release F
  • Release S
  • Release Alt

@JacksonKearl
Copy link
Contributor

JacksonKearl commented Aug 22, 2018

@JackTrapper do you have anything bound to Alt+S? Those steps correctly save the file for me. If you do have something bound to Alt+S, you can also just tap Alt, tap F, then tap S, and save should trigger.

@JackTrapper
Copy link

@JacksonKearl For me pressing Alt+S drops down the Selection menu

Also, nowhere in the Steps to Reproduce did i mention pressing Alt+S.

@JacksonKearl
Copy link
Contributor

JacksonKearl commented Aug 22, 2018

You did mention pressing S as you were pressing Alt, which is pressing Alt+S.

That being said, as normally pressing Alt+S opens the selection menu, it would seem you don't have anything bound to Alt+S. @sbatten do you know whats up here? I can't repro.

@JacksonKearl
Copy link
Contributor

JacksonKearl commented Aug 22, 2018

@JackTrapper does it work if you press and release Alt, then press and release F, then press and release S?

@JackTrapper
Copy link

JackTrapper commented Aug 22, 2018

Edit: Corrected to only reflect what does work

That does work:

  • Press Alt
  • Press F
  • Release F
  • Release Alt
  • Press S
  • Release S

Also works:

  • Press Alt
  • Press F
  • Release Alt
  • Release F
  • Press S
  • Release S

Note: Neither of those are related to this issue.

What happens when you follow the steps to reproduce?

Bonus Reading

@JacksonKearl
Copy link
Contributor

Also works:

Press Alt
Press F
Release F
Press S (saves)
Release S
Release Alt

Steps to Reproduce

Press Alt
Press F
Release F
Press S (no save)
Release S
Release Alt

These are the exact same steps but you say they behave differently. In what contexts does the behavior change?

@JackTrapper
Copy link

Fixed the example of keystrokes that do work.

The issue we're trying to get solved is if Alt is ever still held down while pressing any of the drop-down menu mnemonic.

  • Press Alt
  • Press F
  • Release F
  • Press S
  • Release S
  • Release Alt

@sbatten
Copy link
Member Author

sbatten commented Aug 23, 2018

@JackTrapper please ensure you are using the latest insiders with window.titlebarStyle set to custom Your latest comment shows steps that now work correctly to save the file.

@sbatten sbatten deleted the sbatten/menuMnemonics branch September 18, 2018 17:56
@adamulrich
Copy link

Is it possible to get this ported back to electron? We would love to have working mnemonics in our electron app. Current electron implementation is too buggy to use.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.