Skip to content
This repository has been archived by the owner on Mar 8, 2019. It is now read-only.

"alt-z" should not be undo with Windows+Polish keyboard #16

Closed
jamis opened this issue Mar 13, 2012 · 6 comments
Closed

"alt-z" should not be undo with Windows+Polish keyboard #16

jamis opened this issue Mar 13, 2012 · 6 comments

Comments

@jamis
Copy link

jamis commented Mar 13, 2012

If you have Windows set to use the "Polish (programmer)" keyboard layout, you expect "alt+z" to insert "ż" (z with a dot over it). But wysihtml5 always maps alt+z to "undo", regardless of the default behavior.

This is happening in undo_manager.js in the "keydown" event handler, here: https://github.com/xing/wysihtml5/blob/master/src/undo_manager.js#L42-58

I'm not confident enough about the side-effects to say what the correct fix here is; maybe avoid mapping meta+z to "undo" when the platform is Windows?

@tiff
Copy link
Owner

tiff commented Mar 14, 2012

Expect that to be fixed tonight! :)

@tiff tiff closed this as completed in c8bb6b4 Mar 14, 2012
@tiff
Copy link
Owner

tiff commented Mar 14, 2012

Hey jamis, please check my changes (you have to locally execute "make" first to compile a new wysihtml5.js). Thanks! Ping me if this is still not fixed.

@jamis
Copy link
Author

jamis commented Mar 14, 2012

Fantastic! I'm drowning in deadlines today and tomorrow, but I'll try and give this a test by Friday. Thanks for your quick response on this!

@qrush
Copy link

qrush commented Mar 15, 2012

Hey @tiff, not seeing this fixed and I just deployed the latest rev here. Maybe we need to check for !event.altKey here:

https://github.com/xing/wysihtml5/blob/master/src/undo_manager.js#L48

tiff pushed a commit that referenced this issue Mar 15, 2012
@tiff
Copy link
Owner

tiff commented Mar 15, 2012

Thanks @qrush. I just fired up my old windows pc and tested it. It's not about the meta key + Z as @jamis said. Instead it's about AltGr + Z which sets event.ctrlKey and event.altKey to true. I think I fixed it now finally by checking whether the alt key is pressed.

@qrush
Copy link

qrush commented Mar 15, 2012

Awesome, I'll give it another shot on our end. Thanks immensely for your awesome work!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants