Hotkeys and multiple displays


If I assign hotkeys to my spaces they work only if the display has focus. Moreover if I assign a hotkey for space 1 on display 2 it overrides the assignment for space 1 on display 1.

Can you confirm this?


The hotkeys are for a grid position, not a specific space.

The reason it’s not done per specific space is that you can now drag spaces to different positions - and their hotkeys would move with them, which may be confusing.

Which way would you prefer it worked?

I understand your point. Imho in the preferences UI this is a little confusing, because the name is specific for the space, so I guessed the hotkey is also - never mind.
My usecase is, that I often want to switch to another space on my second display, but only to view updates in some apps without interacting with them. Right now I have to move the mouse to the second display, change the space and move the mouse back, which is some kind annoying.
In another thread is a discussion to use a hotkey for switching displays. This would be helpful, but nevertheless I need three actions in my usecase. It would be fantastic if I could jump to a specific space on any display with a single hotkey.

Understood, and I think that’s a very valid request.
I will consider how best to do this.

We are planning to change the layout prefs to be clearer also.

+1 for the one hotkey per space feature.

My use case is almost the same as @wylrof. And I was going to post a feature request but then I found this topic. But this topic seems too old. Do you still have plans for this feature?

Realistically given the situation with El Capitan, I’m not promising any new features.

On the other hand, it would be perfectly possible to make a plugin to handle this kind of thing, and I could probably make an example. Even easier to do if you have Alfred.

I understand.

Can I do this using the Ruby API? If you can give an example, maybe I can make my own.

Yes, the API is pretty simple for this. Gem install totalspaces2 first.

irb(main):001:0> require 'totalspaces2'
=> true
irb(main):002:0> TotalSpaces2.display_list
=> [{:display_id=>69679040, :display_name=>"Color LCD", :width=>1440, :height=>900}, {:display_id=>69514913, :display_name=>"LED Cinema Display", :width=>2560, :height=>1440}]
irb(main):003:0> TotalSpaces2.number_of_spaces_on_display(69679040)
=> 9
irb(main):004:0> TotalSpaces2.move_to_space_on_display(3, 69679040)
=> true

I don’t know how to bind a hotkey in ruby, but you could easily fire off a ruby script from alfred or some similar software.

Yeah. Thanks for this great API. I wrote one this afternoon. The performance seems pretty good.

I tried to run this script with a keybinding using Karabiner but there are some problems with the rvm PATH. I’m still working on it.