Dalius's blog

Sunday, February 4, 2024

Keyboard with joysticks (part 8): joycon joystick one month after

Previous part: Part seven

One month after using joycon joystick as mouse I can conclude: it can be used as mouse, but it is not great. Trackpad (be it Thinkpad or Mac one) is slightly better, mouse is slightly better as well. The only benefit is that I don’t have to move my hand from keyboard and this one is a huge benefit. Big enough that I don’t need to use mouse.

Experimenting with different ANALOG_JOYSTICK_WEIGHTS I must conclude that linear is best one: it feels quite natural.

Here is Node/JS script to generate linear weights:

const ANALOG_JOYSTICK_SPEED_MAX = 2;
const ANALOG_JOYSTICK_SPEED_REGULATOR = 15;
const DEAD_ZONE = 10;

const minValue = ANALOG_JOYSTICK_SPEED_REGULATOR / ANALOG_JOYSTICK_SPEED_MAX;
const maxValue = 100; // shouldn't be larger than 100
const stepsCount = (100 - DEAD_ZONE)
const stepSize = (maxValue - minValue) / stepsCount;

const result = Array.from(Array(101).keys()).map(x => x < DEAD_ZONE ? 0 : Math.ceil(stepSize * (x - DEAD_ZONE) + minValue));

console.log(JSON.stringify(result))

E.g. I am using this:

#define ANALOG_JOYSTICK_WEIGHTS {0,0,0,0,0,0,0,0,0,0,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100}

I guess I will stop playing/experimenting with this for a while.