mac-mouse-fix icon indicating copy to clipboard operation
mac-mouse-fix copied to clipboard

Kensington Slimblade top buttons support [enhancement]

Open joonhyuk opened this issue 11 months ago • 1 comments

Description

Kensington trackballs have two top buttons but they only works with Kensington Works(very shitty app) or, the SteerMouse app. It would be nice if Mac Mouse Fix support them.

Rationale

HW : Kensington Slimblade OS : Sonoma 14.4 Problem : Two top buttons(button 3, 4) not working

Additional info

VID : 0x47D PID : 0x2041

below javascript is for parsing button in BTT. Hope it helpful!

function analyzeDeviceInput(targetDevice, reportID, reportDataHex) {
      
	let reportBuffer = buffer.Buffer.from(reportDataHex, 'hex');
    // the values you see above are in hex format. To read such a byte
    // use readUInt8(index).
    if(reportBuffer.readUInt8(0) === 0x03) {
        bttTriggerDeviceTrigger(targetDevice, 'button3');
    }
    if(reportBuffer.readUInt8(4) === 0x01) {
        bttTriggerDeviceTrigger(targetDevice, 'button4');
    } else if(reportBuffer.readUInt8(4) === 0x02) {
        bttTriggerDeviceTrigger(targetDevice, 'button5');
    } else if(reportBuffer.readUInt8(4) === 0x03) {
        bttTriggerDeviceTrigger(targetDevice, 'button6');
    }
    // If you want to get the next report even though,
    // the data has not changed, call this function:
    // bttGetNextEvenWithoutChange(targetDevice, reportID)
}
  • button1(bottom left) ,button2(bottom right)
  • button3 = button1+2
  • button4(top left), button5(top right)
  • button6 = button4+5

joonhyuk avatar Mar 22 '24 11:03 joonhyuk