Schlaubischlump/LocationSimulator

[BUG] Arrowkeys Joystick not working

maxuju1 opened this issue · 13 comments

Instead of auto-Navigating to a position, I often like to use the Joysticks with my arrow keys. They haven't been working consistently and now they won't work at all. When auto-walking, the arrow keys merely move the screen (kind of like holding it with your mouse and moving it would). The Navigation Tab also lists the four arrow options as dark grey (non clickable).

I'm running Version 0.2 on MacOS 12.3.1 Monterey and XCode 13.3.1

iPhone XR with iOS 16.3.1

Sorry for Screenshot in German but you get the context.

Bildschirmfoto 2023-05-08 um 17 44 00

Thanks in advance!

Hi @maxuju1,

I'm german as well, so the screenshot being in german isn't a problem 😄

Very strange. I tried to reproduce the error, but everything is working for me (macOS Ventura). Sadly I can only test it on macOS Catalina, Big Sur and Ventura. Maybe you can answer a couple of questions that might help me narrow done the issue:

  • Which movement behaviour have you selected in LocationSimulator settings ? Traditional or natural ?
  • I assume you have already set a fake location before you try to move ? (Sounds stupid, but you never know...)
  • Does it only occur when auto moving is active or also when manual movement is active ?
  • Have you reconfigured the arrow keys in System Preferences ?
  • Have you installed any application, that globally changes keyboard shortcuts or something like this ?

Thanks for the quick reply =)

  • I have tried either movement behavior. It's the same problem nonetheless
  • I have been using locationsim for weeks without problems. The arrow problem had been accuring here and there but it was never permanent. It would fix itself after a few restarts. In fact, I might try restarting my laptop right after leaving this comment to see if anything changes.
  • It occurs for any movement type
  • I never touched my arrow keys. This appeared out of nowhere.

Thanks again

Update: I didn't even restart my laptop but opened and closed LocationSim a few times and now it works again. I don't know what causes this but it's probably a problem that only I experience. In the future this is what I'll do to fix it. Sorry for the waste of your time ^_^
In case you still have some questions regarding this, feel free to ask, but it might be pointless.

I think i found the bug (or at least I can reproduce the error). Have you maybe used the search function before setting a location ? It seems like searching breaks the arrow keys.

that could definitely be it. I'll try avoiding that, thanks!

I found and fixed the bug. I don't know when I will upload a new release, but it will be fixed in the next release.

Thank you @maxuju1 for reporting the error ! Don't ever think you are wasting my time. Detailed bug reports like yours are always very valuable and welcome :)

The new release is online on github. Homebrew might take some days.

I'm still seeing this bug for the latest releases. On 0.2 (0) and 0.2.1 (0) the arrow keys always move the map instead of my position. It last worked on 0.1.9 (8).

Thanks once again for your effort and this helpful tool.

Which macOS version are you using ? What do I have to do to reproduce the bug, because it does not happen for me ...

I'm on macOS Ventura 13.3.1 (a). Following steps to reproduce on my machine:

  • Start LocationSimulator
  • Select some simulator or device
  • Long press somewhere on the map to place initial location
  • Start navigating with arrow keys

See settings screenshot and video of bug:

Bildschirmaufnahme.2023-05-22.um.11.08.32.mp4
Bildschirmfoto 2023-05-22 um 11 07 51

I don't have any kind of remapping of keys regarding the arrow keys as far as I know. As it's working fine with 0.1.9 (8) (I can still successfully use that version) it might be some change to the next version?

I just saw in your screenshot, that you got both search bars. The one in the toolbar and the one in the sidebar.

I wanted to remove the toolbar one in macOS 11 and greater, but it seems like the old UserDefaults are conflicting.

Could you try removing the one in the toolbar and see if the error still persists after restarting the app ?

Great catch! That fixes indeed the problem. For anybody else encountering this, the only way to remove the wrong search is to drop in the new default toolbar.

Thanks for your help!

I just saw that there is actually a bug inside my implementation of the toolbar searchbar. That means, the arrow keys are probably broken on macOS 10.15, since it always uses the toolbar searchbar. I fixed it now.

Thank you for reporting the error ! I'm closing the issue again. The next release will fix the arrow keys on Catalina.

Edit: The new release is online.