Razer Naga Pro 2

Hi,

I'm trying to configure the Razer Naga Pro 2 and I'm using the generic device.

I was able with the analyser the create the JS that identify the button and so create the trigger for each of the 12 buttons. "LP - Button 1" to 12.

I was able after to use the new trigger created like "LP - Button 1" and assigned some action.

Result:

  • The trigger is triggered I can see it with the HUD overlay I added but it still use the basic keyboard key from button 1 which is to print 1 and also the action on the trigger in this exemple W.
  • when trigger has been triggered once it doenst re trigger if I press again the button 1 of my mouse.
    -> result is W1 rather than just W and then the trigger is not triggered anymore till I click a bit everywhere and at some point it seems to reset it and its triggered again

My script
// Enter your input analyzer script here.
// Do not change the function signatures
function analyzeDeviceInput(targetDevice, reportID, reportDataHex) {

let reportBuffer = buffer.Buffer.from(reportDataHex, 'hex');

if (reportID === 6)
{
    if (reportBuffer.readUInt8(3) === 0x1E) {
        log('LP - Button 1');
        bttTriggerDeviceTrigger(targetDevice, 'LP - Button 1');
    }

    if (reportBuffer.readUInt8(3) === 0x1F) {
        log('LP - Button 2');
        bttTriggerDeviceTrigger(targetDevice, 'LP - Button 2');
    }

    if (reportBuffer.readUInt8(3) === 0x20) {
        log('LP - Button 3');
        bttTriggerDeviceTrigger(targetDevice, 'LP - Button 3');
    }

    if (reportBuffer.readUInt8(3) === 0x21) {
        log('LP - Button 4');
        bttTriggerDeviceTrigger(targetDevice, 'LP - Button 4');
    }

    if (reportBuffer.readUInt8(3) === 0x22) {
        log('LP - Button 5');
        bttTriggerDeviceTrigger(targetDevice, 'LP - Button 5');
    }        

    if (reportBuffer.readUInt8(3) === 0x23) {
        log('LP - Button 6');
        bttTriggerDeviceTrigger(targetDevice, 'LP - Button 6');
    }  

    if (reportBuffer.readUInt8(3) === 0x24) {
        log('LP - Button 7');
        bttTriggerDeviceTrigger(targetDevice, 'LP - Button 7');
    }  

    if (reportBuffer.readUInt8(3) === 0x25) {
        log('LP - Button 8');
        bttTriggerDeviceTrigger(targetDevice, 'LP - Button 8');
    }  

    if (reportBuffer.readUInt8(3) === 0x26) {
        log('LP - Button 9');
        bttTriggerDeviceTrigger(targetDevice, 'LP - Button 9');
    }  

    if (reportBuffer.readUInt8(3) === 0x27) {
        log('LP - Button 10');
        bttTriggerDeviceTrigger(targetDevice, 'LP - Button 10');
    }  

    if (reportBuffer.readUInt8(3) === 0x2D) {
        log('LP - Button 11');
        bttTriggerDeviceTrigger(targetDevice, 'LP - Button 11');
    }  

    if (reportBuffer.readUInt8(3) === 0x2E) {
        log('LP - Button 12');
        bttTriggerDeviceTrigger(targetDevice, 'LP - Button 12');
    }  

}

}

UPDATE 1 - I added in my script
bttGetNextEvenWithoutChange(targetDevice, reportID)

This allow to capture next even when i click with the mouse.
So really now the issue is that when i click it trigger the initial key of the mouse "1" and also the trigger I create W so always display W1W1W1 instead of WWWW

have you selected the „try to get exclusive access“ checkbox? Unfortunately for some devices it‘s not possible to get exclusive access which means it will trigger the system default. In that case you might need to override the shortcuts by creating a keyboard shortcut in BTT and set it to „only works on keyboard used for recording“

(not on my computer, can post a screenshot later)

Thank you for your answer, very quick as usual.

I tried exclusive access and when I do this the mouse stop "functionning" moving.

I tried the shortcut as you suggested but Im not sure I did it right and it didnt change anything


Re,

So with your information I think I made it work.

I stop using the generic device but used the shortcut and set up the short cut to only work on the recorded keyboard as you mentionned.

And with my first tests its seems to work well.

Man, your tool is so technical and good thats amazing! You very good at what you do.