tmk / tmk_keyboard

Keyboard firmwares for Atmel AVR and Cortex-M
3.99k stars 1.71k forks source link

what usb hid codes actually work? #590

Open g-i-o-r-g-i-o opened 5 years ago

g-i-o-r-g-i-o commented 5 years ago

Hello, I'm using the USB_USB converter bought from you; I've tried almost all the usb keycodes described in the firmware, by assigning them to virtual layers. The testing method has proven quite unreliable, and I've found that only a small part of those keycodes actyally work. Is there a way to understand what codes actually work? Only a few of the KC_KP codes seem to work (windows 10 and linux vitualbox).

For example, if I want to test the code

define AUDIO_VOL_UP 0x00E9

without programming each time your firmware, how can I test it?

Suppose that I'm trying to send these codes, how would I do it in your firmware? // 0xc3 Keypad ^ // 0xc4 Keypad % // 0xc5 Keypad < // 0xc6 Keypad > // 0xc7 Keypad & // 0xc8 Keypad &&

Do you recomend this method, in your firmware? ACTION_USAGE_CONSUMER(0x6F) https://github.com/tmk/tmk_keyboard/issues/370

Thanks in advance

tmk commented 5 years ago

You can send those keypad codes using AC_KP_* code. AC_ is action code for newer actionmap and unimap while KC_ is used for old keymap. I think you want to use AC_ in your unimap.c for usb-usb converter.

Yes, use ACTION_USAGE_CONSUMER() for consumer page usages like volume and media control. Definitions in report.h have some limitations and are used for old keymap.

g-i-o-r-g-i-o commented 5 years ago

Sorry for being a newbie, but how do I define "usb hid" action codes in unimap.c? then is suppose that I'll program it using make -f Makefile.unimap clean make -f Makefile.unimap make dfu

and I get the "missing separator" error :-((((

tmk commented 5 years ago

For example, Define AC_ name for your action like this line in your unimap.c before using it,

#define AC_xxxx ACTION_USAGE_CONSUMER(0x6F)

And then place xxxx in your UNIMAP().

g-i-o-r-g-i-o commented 5 years ago

Is it fast or does the output get easily chocked? I'm asking because I need to write with a sustained speed. Thanks

tmk commented 5 years ago

Probably chocked. Consumer keys and system control keys are sent one by one and you can't send two or more keys at once. Those keys are not expected to be used in typing in TMK.

what is your problem actually?

g-i-o-r-g-i-o commented 5 years ago

I need a layer that inputs some ascii characters without choking (it should sostain standard writing speed, because I need those symbols to write text and commands for a program). So far I've used a few of the available symbols, but there's a very small number of those.

GRAVE 
KP_ASTERISK 
not working KP_CLEAR ←
not working KP_CLEAR_ENTRY ¡ 
works only in vim KP_EQUAL =
KP_MINUS 
KP_SLASH  
NONUS_BSLASH 
BSLASH 
COMMA,
EQUAL 
KP_COMMA 
KP_PLUS 
LBRACKET è 
MINUS 
NONUS_HASH 
QUOTE 
RBRACKET 
SCOLON 
SLASH