[atreus] Re: Mouse keys -- yes, it works!

  • From: Mauro Lopes <maurolopes@xxxxxxxxx>
  • To: atreus@xxxxxxxxxxxxx
  • Date: Tue, 26 Apr 2016 14:17:44 -0300

Sure. Hopefully this will make it clear:

https://github.com/maurolopes/tmk_keyboard/commit/00fe542606e9271b625787dde092960f9887273d?diff=unified

On Mon, Apr 25, 2016 at 10:37 PM, Loren Rogers <loren@xxxxxxxxxxxxxxxx>
wrote:

Dang! This is awesome news!

Mauro, any chance you could post a working sample? I sketched up a
quick attempt at this a while back:

https://github.com/lorentrogers/tmk_keyboard/commit/ead16368ce0623e43fb66e64f00542f6e69e234b

Loren


On 04/25/2016 09:53 AM, Phil Hagelberg wrote:
Mauro Lopes <maurolopes@xxxxxxxxx> writes:

For reasons that I still don't understand, you can't just use
mouse keycodes directly in the keymap. But it works perfectly
(all mouse commands) if you create an action and point to it in
the keymap!

I think this is because the keymap is normally array of 8-bit
numbers, so there isn't enough room there for all the possible
actions you could put in the actions array. I have bumped it up in
my fork to a 16-bit number, but 4 of those bits are dedicated to
modifiers now, so mouse keys still need to be in their own action.

I will try to get this better-documented; thanks!

-Phil




Other related posts: