ValveSoftware / Dota-2

Tracker for issues specific to Linux and Mac in the Reborn client. If you have a general issue or non-system-specific feature request please go to dev.dota2.com
470 stars 38 forks source link

[Mac] Pressing and holding ALT/⌘-key doesn't show attack range/viewfinder etc. #1440

Open hipunk opened 6 years ago

hipunk commented 6 years ago

Hi,

Your system information

Please describe your issue in as much detail as possible:

Describe what you expected should happen and what did happen. Please link any large pastes as a Github Gist. Expectation: Pressing and holding the ALT/⌘-key should show the attack range/viewfinders/creepspawn areas/tower attack range. This works in Linux and also did in OS X at the end of 2017. What really happens: It doesn't show up. ALT/⌘-key does get recognized because clicking sends a ping. Disabling it doesn't help. Reenabling doesn't help. Putting the 'Alt Modifier' shortcut on another key doesn't help.

Steps for reproducing this issue:

  1. Launch game.
  2. Enter match.
  3. Position next to a tower.
  4. Press and hold 'Alt Modifier' (⌘ is the default)

I have waited about a month to file this bug as I thought you might fix it, but it didn't get fixed? It's kind of an unfair advantage for Linux/Windows users at this point. I'm not complaining - I'm just pointing it out.

Greetz and thanks,

hipunk

danginsburg commented 6 years ago

We've been unable to repro this on several Macs. For me, holding ALT does the same thing on macOS as it does on Windows/Linux. When I hold Alt/Option on my Macbook Pro (Mid 2012) I see this:

20180409084545_1

Which does what I would expect based on the options (highlights hero, shows neutral spawn boxes, and tower attack range):

20180409084703_1

hipunk commented 6 years ago

Hmm, that is very odd. I would suspect lacking support on my system if I wouldn't know that it once worked. Another thing that kind of shows that it cannot really be something like lack of OpenGL support or similar, is that the range is being shown when e.g. the tower is being clicked like it was before this setting existed, like so: clicking the tower

Another oddity I noticed, is that the hero is being highlighted when the alt key is being pushed down like so: command pushed down (I opened the keyboard viewer for better reference) (See? No attack range)

and then lifted up, like so: command key pressed once and lifted

the arrow above the hero does not disappear. It only disappears when I push down any other key, e.g. option modifier but also others like a - z. Here is the same part of my settings:

settings

Here another one to reassure command key is the alt-key modifier: left command as alt modifier

hipunk commented 6 years ago

I found it! It is this setting:

screen shot 2018-04-09 at 20 30 04

I am using that switched layout since way over a decade, so changing this is absolutely impossible for me 😅 Keys and wizards, wizards and keys...

Can we get the old behaviour back where Dota 2 respected this setting? I know for a fact, that it worked in the past. Of course I've used the range finder in the past (who wouldn't? 🤣) and all my keyboards have had this setting set up since the mac version of Dota 2 exists (and before that)...

I cannot really tell which exact patch broke it, because I was using Ubuntu the last 4 months to enjoy vulkan, amongst other things, but it worked before the renderer setting existed, that is for sure.

Greetz,

hipunk

gdrewb-valve commented 6 years ago

The keyboard system settings are handled underneath Dota, it's not aware of any of those settings. It's possible that something in SDL changed how it interprets keys, assigning to the SDL dev.

hipunk commented 6 years ago

I noticed you ship a new version of SDL in the latest steam beta, sadly it brings no change to this particular issue here.

hipunk commented 5 years ago

Did the SDL devs say something yet? :-/

You had it running once.

I'm still playing without these rangefinders etc. because changing those settings back before each match is just too much of a hassle. Bear in mind it's not only that: When you push down Apple-key/command, the map will show the names of the heros. And the map will be stuck in that view until you push option/alt down at least once.

10.13.6 (17G3025) Steam client application Built: Nov 9 2018, at 18:51:43 Steam API: v018 Steam Package versions: 1541819448 Dota client application Version: 3,236 Gameplay version: 7.20

hipunk commented 5 years ago

I've written a quick workaround, so far it has to be invoked manually (before opening up Dota 2 and after having closed it). I've worked a few minutes on a launchagent/launchdaemon version that automates it, but it's overkill for something that's hopefully fixed soon enough anyways, so it's finished already and as is.

hipunk commented 5 years ago

You don't care, I don't care. I stopped hosting the workarounds, I'm sure you'll understand.

hipunk commented 5 years ago

Update: Currently alphatesting an updated workaround that switches automatically.

hipunk commented 5 years ago

Workaround:

Automatic switcher Agent.

Preview:

Download link: http://hipunk.net/other/Dota%202%20Keyboard%20Driver.dmg

hipunk commented 4 years ago

Quick headsup: /usr/bin/osascript in combination with System Events is broken since the release of macOS 10.14 public beta 1 (released september 2018) and 1 1/2 years later Apple still hasn't fixed it yet. AppleScript is one of the few reasons why I actually use OS X, LOL.........

So the automatic workaround won't work there. It's because of the new "security" permission fud in Security System Preferences.

If you are interested in any more additional info of how I wrote those AppleScripts with UI Browser etc. or anything, let me know.

Dota 2 needed a voice chat in the main menu, by the way.