Toggle between windows in OSX


#1

In OSX, it’s usually possible to toggle between windows of the same application using “Cmd-`”, however it doesn’t seem to work with Atom (which prints the backtilde character instead).

Any idea if there is any other shortcut or any way to enable the built-in OSX shortcut?


#2

Yes, it can be quite annoying, the only workaround I found is to click on the tree-view background or on the tabs-view background and then pressing cmd+`.


#3

+` changes window focus for me as it should on v0.95.0.

Do you have any more details about when it doesn’t work?


#4

Just confirmed that it works for me too …


#5

I’ve just tried again and it definitely doesn’t work for me (on OSX 10.9.2), it still simply prints the “`” character.

I’m starting to think there’s something wrong with my ⌘ key on Atom, as I’ve also just realized that all the shortcuts that use ⌘ don’t work anymore (they used to).


#6

A couple things to try:

  1. Close Atom and launch using atom --safe from the command line (this loads only the default packages)
  2. Use the Keybinding Resolver, Cmd+. or Packages > Keybinding Resolver > Toggle, to see how Atom is interpreting the keys you press (you should see “cmd” show up in the Keybinding Resolver even if you just press the Command key by itself)

#7

Same here, I suspect that, just like in this issue there’s some link to the system keyboard settings or localization stuff (I’m using the french keyboard config).

@leedohm: gives me cmd-Å and still print a `


#8

A bit of follow-up on this issue:

I tried to understand why Atom trigger a Å instead of `, still got no clue.

Both chrome and safari trigger a keycode of 220 (\) when firefox trigger a keycode of 192 (a backtick or a tilde depending on the os) and finally Opera doesn’t dispatch a keyboard event for that key (but still input a backtick in text fields). The logical conclusion is that webkit is already handling this key in its own way.

But logging the keydown event in Atom when the focus in on an editor view produce the following event for my backtick key:

keyCode: 229
keyIdentifier: "U+00C5" 

The U+00C5 correspond to the Å, but it still write a ` in the editor.

When triggered on the tree view or on the tabs view the event is now:

keyCode: 220
keyIdentifier: "Unidentified"

So I’m a bit at loss here.

I would like having @lau confirmation on that, do you have the same results?

I tried to search in the atom, atom-keymap and atom-shell repos for a potential mapping of a keycode of 229 to a ` but it seems there’s no such mapping. So I just don’t get what’s going on.

Maybe with more data we could find a clue about that, but as is it’s a dead end.

Edit: the 220 vs 229 is the same in chrome. I’ll try to look in this direction.


#9

Just for comparison, I hooked the keydown event with the following code:

view = atom.workspaceView.getActivePaneView()
foo = null
view.keydown(function(event) { foo = event })

And when I’m in an EditorView or ReactEditorView, I get the following:

keyCode: 192
keyIdentifier: "U+0060"
metaKey: true

#10

I found the answer: There’s not.

Basically this is a behavior induced by the underlying os keyboard layout (French and many other setup use dead keys to produce accented characters, ` + e gives a è for instance).
There’s no way to disable that in the default layouts provided in osx so the only option is to create a new one and get rid of the dead keys in the process (with a tool like ukulele).
I just created my own layout based on my current layout, removing the dead keys and now it works like a charm.


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

@abe, I’m also on a French keyboard, and I’m seeing the same issues too.

Other applications, including Sublime Text, handle this standard shortcut well though, so there’s probably a way to get it working. I’m not familiar how Atom handles system shortcuts, but maybe the problem is that it catches all the shortcuts and tries to emulate them, expect it’s not handling this one correctly.


#12

Yes there probably a solution at the atom-shell level, but it goes beyond my knowledge ^^’


#13

Here is a relavant discussion on atom-shell level. It turns out to be a chrome bug, but it might be possible to fix this insisde atom without waiting chrome guys to fix the issue