Os X. cmd-` short does not work on some keybord layouts (azerty)


#1

Hello all,

I’d like to fix an annoying bug of atom that happens on “azerty” keyboard on Os X. It is not possible to switch beween windows using the standard cmd-` shortcut.

This shortcut works when we are focused on a tree view, so cmd-0 then cmd-` does the trick. It also works on standard qwerty keyboards.

This shortcut is never overloaded or defined in atom/atom code. I then thought it should be related to somewhere else. This is how I discovered atom/atom-shell which is a great project in itself. I came across the class defined in /atom/browser/ui/cocoa/event_processing_window.h (atom/atom-shell) that seems to handle this shortcut. I guess @zcbenz could help me further diagnose why it does not work on my azerty mac.

The main discussion about this is the following : Command to switch between windows

This discussion has not led to anywhere, since some guys say they have the problem, some other say they don’t, a atom maintainer mentions that there is no API to switch between windows, etc. The truth is that there is no single line of code in atom/atom handling such a shortcut and my guess is that it is related to this project, or at least could be fixed in this project.

I’d like to help and to contribute if necessary but if you could give me a starting point it would really save me a lot of time. I have reasonable skills in C++ / objective-C / and node.js.

Thanks in advance !

Romain


Toggle between windows in OSX
#2

This is an issue due to the fact that when the focus is in an editor in fact a hidden input is focused, and if you have a keyboard layout that sets ⌘ ` as a dead key, chrome (that atom use) will use your system layout for input, disabling this particular shortcut for switching windows.

I already solved that by tweaking the layout as I explain in that post:


#3

Thank you. I also saw this by trying to switch windows from a focused input in chrome. It works on a standard qwerty layout, but not on a azerty layout. I understand that the ` key is important to write è for examples (even though è has its dedicated key on french azerty keyboards), but there is definitely a difference between typing cmd-` and typing ` alone from an input in chrome.

I think this could be submitted as a bug in chrome, but in the mean time, the question for atom-shell developers (including me if someone tells me where to start) is to know whether this chrome behavior could be overloaded in atom-shell.


#4

Yeah this should a Chrome bug, the input handling is hidden deeply in Chrome so it is not easy to overload this behavior in atom-shell.


#5

Hi abe ,

I know you answer is quite old, but before I start fiddling with the os keymap with ukulele, what are the consequences of disabling “dead keys” ?
Does it mean that `a == à, etc will stop working for the whole OS ? I suppose the “dead” keys are here for a reason.


#6

Does it mean that `a == à, etc will stop working for the whole OS ?

Exactly, this is clearly not ideal but as an azerty keyboard should already have the à, è and ù keys it’s not that big of a problem (at least for french people I guess). Note that this is the only dead key that I deactivate.
The tradeoff here is how often do you switch Atom windows VS how often do you use these specific dead keys. In my case I almost never used them (switching OS frequently made me more inclined to rely on my keyboard layout rather than on OS IME).


#7

Thanks for your answer that makes the tradeoff very clear. With no fix in either atom or chrome in view I guess I’ll disable that dead key …


#8

I made a different choice. I use ⌘ ⌥ - Tab to switch between windows of an application. To do this, open System Preferences, then go to Keyboard, then the Shortcuts tab, then select “Keyboard” from the left column, then change the shortcut for “Move focus to the next window”.

Dead keys FTW!

(I use US Intl keyboard layout which preserves my sanity as a hacker yet still allows me to enter ä, ö, ü for my German emails.)


#9

thank you !!
I decided to use ⌘@in my case.