Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Huion q620m (drawing tablet) Buttons not working #180

Open
aus10code opened this issue Apr 14, 2021 · 6 comments
Open

Huion q620m (drawing tablet) Buttons not working #180

aus10code opened this issue Apr 14, 2021 · 6 comments

Comments

@aus10code
Copy link

My new huion q620m buttons aren't working on the drawing tablet and "e" character isn't working on stylus either. However mouse functionality bound to stylus works.

@aus10code aus10code changed the title Huion q620m Buttons not working Huion q620m (drawing tablet) Buttons not working Apr 15, 2021
@perplexedMurfy
Copy link

I am encountering similar issue with my Huion drawing tablet (Model No. HS64).

With both the buttons on the tablet and the buttons on the pen itself, if I set them to send a key press Milton ignores it. Milton does respond when a mouse button is bound to one of these buttons.

Interestingly, the keypresses sent by tablet and pen buttons do get registered by Milton's settings window.

I have confirmed that the tablet and pen buttons can correctly send key presses to other applications on my system.

@karanjoisher
Copy link

Facing the same issue with Huion H950P. For e.g. one of my tablet button is bound to Ctrl + Numpad+, but it doesn't work in Milton. In order to pan around I need to hold space on keyboard(instead of tablet button) and then I can use my stylus to pan around.

@robsim378
Copy link

I have the exact same problem with my Huion Kamvas Pro 12. The buttons are registered everywhere else in windows, including Milton's settings, but in the actual app the only ones that work are those bound to mouse buttons.

@pcone
Copy link

pcone commented Sep 11, 2021

I'm seeing this as well on a Kamvas Pro 16 on Windows. I also can't find any way to rebind the space to move canvas hotkey? If I could rebind that to a mouse button (and if they work as robsim378 says) then I could work around this.

@pcone
Copy link

pcone commented Sep 11, 2021

Aha - I found a workaround that works for me. I noticed the middle button also works to drag the canvas.
So I've disabled Windows ink in my Huion driver settings (this feature seems to be intended solely for devices that have both pens and touch input, and screws everything up otherwise), and bound one of the pen buttons to middle mouse which seems to work.

I still can't use anything but mouse buttons on any of the tablet or pen buttons however.

@Cavantar
Copy link

Cavantar commented Aug 22, 2022

I got this tablet today, and had the same issue.
The problem is in the device driver, key up events arent properly constructed or at least incompatible with sdl.
Sdl derives most of key codes from lParam scan code parts, and exactly those parts are equal to 0 in case of huion keyup events.
This is kind of related issue => https://github.com/libsdl-org/SDL/issues/3321.
Solved my problem by adding following code to file: SDL_windowsevents.c, method:

static SDL_Scancode VKeytoScancode(WPARAM vkey) {
...
    case VK_SPACE: return SDL_SCANCODE_SPACE;
    case 0x30: return SDL_SCANCODE_0;
    case 0x31: return SDL_SCANCODE_1;
    case 0x32: return SDL_SCANCODE_2;
    case 0x33: return SDL_SCANCODE_3;
    case 0x34: return SDL_SCANCODE_4;
    case 0x35: return SDL_SCANCODE_5;
    case 0x36: return SDL_SCANCODE_6;
    case 0x37: return SDL_SCANCODE_7;
    case 0x38: return SDL_SCANCODE_8;
    case 0x39: return SDL_SCANCODE_9;
    case 0x41: return SDL_SCANCODE_A;
    case 0x42: return SDL_SCANCODE_B;
    case 0x43: return SDL_SCANCODE_C;
    case 0x44: return SDL_SCANCODE_D;
    case 0x45: return SDL_SCANCODE_E;
    case 0x46: return SDL_SCANCODE_F;
    case 0x47: return SDL_SCANCODE_G;
    case 0x48: return SDL_SCANCODE_H;
    case 0x49: return SDL_SCANCODE_I;
    case 0x4A: return SDL_SCANCODE_J;
    case 0x4B: return SDL_SCANCODE_K;
    case 0x4C: return SDL_SCANCODE_L;
    case 0x4D: return SDL_SCANCODE_M;
    case 0x4E: return SDL_SCANCODE_N;
    case 0x4F: return SDL_SCANCODE_O;
    case 0x50: return SDL_SCANCODE_P;
    case 0x51: return SDL_SCANCODE_Q;
    case 0x52: return SDL_SCANCODE_R;
    case 0x53: return SDL_SCANCODE_S;
    case 0x54: return SDL_SCANCODE_T;
    case 0x55: return SDL_SCANCODE_U;
    case 0x56: return SDL_SCANCODE_V;
    case 0x57: return SDL_SCANCODE_W;
    case 0x58: return SDL_SCANCODE_X;
    case 0x59: return SDL_SCANCODE_Y;
    case 0x5A: return SDL_SCANCODE_Z;
...
}

Note that this is not final solution, this may brake stuff, and apparently they reverted the patch in sdl repo but that may be different case.
There should probably more keys handled here, but I added only the ones that I need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants