# Trouble with mouse keys

**URL:** <https://community.keyboard.io/t/trouble-with-mouse-keys/918>\
**Category:** Programming\
**Created:** [January 4, 2018, 7:31pm UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918 "2018-01-04T19:31:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![So8res](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/so8res/32/545_2.png) [@So8res](https://community.keyboard.io/u/So8res)\
**Post date:** [January 4, 2018, 7:31pm UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/1 "2018-01-04T19:31:08Z")

</div>

After tweaking my keyboardio a bunch (with much satisfaction), the mouse-movement keys aren’t working any more. They were working a month or two ago (I’m like 90% confident in this); I’m not quite sure when they stopped. Interesting facts:

(1) The mouse warp keys work fine; it’s just mouseUp and mouseDn and co that aren’t working.  
(2) mouseUp etc. don’t work even when I load the original Model01-Firmware ino  
(3) I’m on a mac, fwiw

any ideas as to what’s going on, or how to debug the issue? I’ve debugged a little, to no avail.

---

<div class="post-metadata">

**Author:** ![So8res](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/so8res/32/545_2.png) [@So8res](https://community.keyboard.io/u/So8res)\
**Post date:** [January 6, 2018, 3:24am UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/2 "2018-01-06T03:24:17Z")

</div>

Update: the problem only occurs on Macs, or, at least, I’ve verified that mouseUp and co are working fine on linux.

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [January 6, 2018, 7:38pm UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/3 "2018-01-06T19:38:40Z")

</div>

I’ll see if I can find the problem after I get back home. I can probably take some time to look into it on Monday.

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [January 8, 2018, 10:39pm UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/4 "2018-01-08T22:39:17Z")

</div>

I can confirm this bug. I’ve tried a few different versions of Kaleidoscope-MouseKeys, including one from a time when I’m sure it was working, and think I’ve determined that the plugin is not to blame. I’ll write up an issue when I have a better idea where the problem comes from.

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [January 8, 2018, 11:37pm UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/5 "2018-01-08T23:37:32Z")

</div>

Arduino-Boards v1.22 does have working mouse movement keys on macOS, so whatever caused this problem happened since then.

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [January 9, 2018, 5:05am UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/6 "2018-01-09T05:05:11Z")

</div>

I’m now fairly certain that this problem is in KeyboardioHID, not Kaleidoscope or Kaleidoscope-MouseKeys. But there have been lots of changes since the last known working version, so I’ll try to find out which one it is tomorrow.

---

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [January 9, 2018, 10:29am UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/7 "2018-01-09T10:29:53Z")

</div>

My gut feeling is that if anything, [this pull request](https://github.com/keyboardio/KeyboardioHID/pull/21) might be to blame. Can you try reverting that, and seeing if it works under OSX?

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [January 9, 2018, 1:03pm UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/8 "2018-01-09T13:03:18Z")

</div>

I’ll give it a try later this morning — thanks!

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [January 9, 2018, 3:36pm UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/9 "2018-01-09T15:36:41Z")

</div>

> [@algernon](#):
>
> My gut feeling is that if anything, this pull request might be to blame. Can you try reverting that, and seeing if it works under OSX?

I checked out the current HEAD of everything, and reverted that commit (b23f4e), but mouse movement keys are still not working. I’ll try some other versions and see if I can find the last working one. I’m guessing I may have to also downgrade Kaleidoscope a bit for compatibility?

---

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [January 9, 2018, 4:13pm UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/10 "2018-01-09T16:13:33Z")

</div>

> [@merlin](#):
>
> I checked out the current HEAD of everything, and reverted that commit (b23f4e)

Mmm… the commit is [ea0b9f56e82d6c97380396af01f63fb33603a85f](https://github.com/keyboardio/KeyboardioHID/commit/ea0b9f56e82d6c97380396af01f63fb33603a85f)… if reverting that still doesn’t work then PR14 is my next suspicion.

> [@merlin](#):
>
> I’m guessing I may have to also downgrade Kaleidoscope a bit for compatibility?

For the `ea0b9f56` revert, no. For others, very likely, indeed, I’m afraid.

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [January 9, 2018, 4:20pm UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/11 "2018-01-09T16:20:10Z")

</div>

Sorry; I accidentally copied the commit id for the revert of `ea0b9f…` instead of the commit itself. But when I look at it, the `git revert` did not correctly revert that change. I’ll give it another try, by hand.

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [January 9, 2018, 4:25pm UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/12 "2018-01-09T16:25:30Z")

</div>

And…nope. Still doesn’t work. Maybe it’s this one?

> <https://github.com/keyboardio/KeyboardioHID/pull/14/files>

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [January 9, 2018, 4:29pm UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/13 "2018-01-09T16:29:32Z")

</div>

I tried just adding a `sendReport()` call to `Mouse_::move()`, but that didn’t help (nor did I really expect it to, since mouse movement seems to be working on other operating systems).

EDIT: `sendReportUnchecked()` also doesn’t help. I think it must be that the HID descriptor itself is what’s failing; I don’t think I’m going to be able to figure that out myself.

---

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [January 9, 2018, 4:39pm UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/14 "2018-01-09T16:39:10Z")

</div>

What would be interesting to know at this point, if OSX even recognizes the device as a mouse.

Another thing to try is to revert the revert of the HID descriptor change, [this one](https://github.com/keyboardio/KeyboardioHID/commit/3f57fe6de7aaa60adb21d80eee14c76de82bc517). You may need to revert [this other one](https://github.com/keyboardio/KeyboardioHID/commit/79655a5543a5db17b3ecde114a2aa7a3000fd624) first.

Just shooting in the dark here, as I have no easy OSX access ☹

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [January 9, 2018, 4:46pm UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/15 "2018-01-09T16:46:58Z")

</div>

Before I do that, is there a quick way for me to check from the OS side to see what “mouse” devices it thinks are connected? I haven’t been able to find anything like that (my competence for this kind of task is much higher on Linux, I’m afraid). Maybe `ioreg` could help if I knew what options to give it, and how to parse the output…

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [January 9, 2018, 5:13pm UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/16 "2018-01-09T17:13:50Z")

</div>

> [@algernon](#):
>
> Another thing to try is to revert the revert of the HID descriptor change, this one. You may need to revert this other one first.

Those two changes occurred after it was broken. I had to roll back KeyboardioHID, Kaleidoscope, and Kaleidoscope-MouseKeys quite a bit to find a working version. I’m still plugging away at this; I’ll let you know when I get to the actual last version(s) that worked.

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [January 9, 2018, 5:41pm UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/17 "2018-01-09T17:41:20Z")

</div>

Found it:

> <https://github.com/keyboardio/KeyboardioHID/pull/12>

I can barely speculate regarding the actual cause, but I have a set of code that works without this change, and fails when the change is applied. I’ll submit an issue against KeyboardioHID shortly.

---

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [January 9, 2018, 5:51pm UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/18 "2018-01-09T17:51:37Z")

</div>

Yeah, that was known to break it, and one of the later commits fixed that, supposedly. Even on OSX, as I had @james.nvc and @Simon-Claudius test the fix…

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [January 9, 2018, 5:58pm UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/19 "2018-01-09T17:58:26Z")

</div>

I think I remember testing that, too, but didn’t it make the whole keyboard non-functional? I don’t think I tested mouse movement specifically.

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [January 9, 2018, 6:13pm UTC](https://community.keyboard.io/t/trouble-with-mouse-keys/918/20 "2018-01-09T18:13:05Z")

</div>

I made some quick changes, and by removing horizontal scroll support, I can get mouse movement working again on macOS.

[Next page](https://community.keyboard.io/t/trouble-with-mouse-keys/918.md?page=2)
