-
Notifications
You must be signed in to change notification settings - Fork 18
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
Newbie, How to rewire keys on second BT keyboard (numpad)? (AHI related) #115
Comments
Hi
I'd approach it like this...
Switch the capsicain console to debug mode (ESC+D)
Press 1 on keyboard, then press 1 on keypad.
From your descripton, I assume both send the same keycode, labeled "1".
When you press a key on the keyboard, then a key on the keypad, you should see a message that the device has changed, and its ID, for example
keyboard device id: hid\{00001124-0000-1000-8000-00805f9b34fb}_vid&00020a5c_pid&8502&col01
Find a substring that is unique to the keypad (like "0001124")
For your capsicain.ini you need
OPTION IncludeDeviceID 0001124
This limits all changes to the keypad. When a device whose ID does not contain "0001124" sends a key event, capsicain does not touch it.
For a description see https://github.com/cajhin/capsicain/wiki/Keyword%3A-OPTION#option-includedeviceid-searchstring
Now you have to rewire regular number keys to "keypad number keys"
REWIRE 1 NP1
REWIRE 2 NP2
...
REWIRE 0 NP0
That should work (I can't try it out right now)
Good luck, please let me know if you succeed
Jörn
… On 30. Aug 2024, at 18:37, PeterP1975 ***@***.***> wrote:
Hi,
Sorry for asking on this forum, I know its AutoHotInterception related, but maybe its possible to make it in Capsicain only???
Setup: 2 BT devices: K380 logitech keyboard, 2nd is numpad from China that sends wrong keycodes (Keycodes 0-9 = the same in logitech keyboard number row). Lack of proper keycodes on numpad made me to remap numpad keys to proper ones: Numpad1, Numpad2 instead of 1, 2 etc. No changes to K380 logitech keyboard.
So far i have:
#SingleInstance force
Persistent
#include Lib\AutoHotInterception.ahk
AHI := AutoHotInterception()
keyboardId := AHI.GetKeyboardIdFromHandle("HID{00001124-0000-1000-8000-00805f9b34fb}_VID&000204e8_PID&7021&Col01")
AHI.SubscribeKeyboard(keyboardId, true, KeyEvent)
return
WHAT NEXT?
How to remap, i only have isolated keyboard (numpad) number.. OR How to rewire numpad keyboard using Capsicain??
Cheers
Peter
—
Reply to this email directly, view it on GitHub <#115>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABBEBJVW6VCVHYRLAJBWW3DZUCNU5AVCNFSM6AAAAABNMZR6XSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ4TONZWGA2TCMI>.
You are receiving this because you are subscribed to this thread.
|
Hi, apologies for my delay Unfortunately there are my device ids (connected via BT): I'd like to add that i have LWin::F24 on K380 but in AutoHotkey.ahk config file (is run by capsicain). Any thoughts on:
So i think all should be rewired by capsicain.ini. Lwin to F24 on K380 keyboard AND certain keys on numpad. How to do it? CONFIG capsicain.ini CONFIG AutoHotkey.ahk Cheers |
For your keyboard, you would want an ini like
...but that of course ignores your numpad. Not sure what F24 is supposed to do for you. |
F24 in my case should work as another modifier key (like ctr, shift, alt). Blender compared to eg 3ds Max has a lot of keybindings (I mean A LOT - with new Blender 4.2 extension platform for example letter "t" has 26 bindings and this is not an exception "r"is about 27..) Anyway: My config now: [CONFIG_1] Numpad keys works flawleslly (Blender reads it properly).
?? |
1. using the key labels (as defined by capsicain) is correct. You don't put key codes into the ini file, capsicain translates that for you (I'd rather remember the label LCTRL than code 0x1D)
No need to guess. Open debug console (ESC+D) tap Space, you see "SPACEv" then "SPACE^". So SPACE is the label for that key you pressed. Works the same with any other key.
2. I've never seen "00" other than on toilet doors. Again, check what the key does in debug mode. If the numpad simply sends "zero down, up, down, up", then there is no way to distinguish it from pressing 0 two times, which means you can't use it as a modifier.
Is it a LogiLink with 35 keys?
I'm not quite sure how you want to use the numpad in Blender. I think I'd want to have the common modifiers (shift ctrl alt) on the numpad?
Maybe rewire Enter->Shift, that allows you to type "Shift+Number" combos with your left hand, without breaking any fingers.
COMBOs are things with modifiers, like "press CTRL-0 to send Shift+Alt+Spacebar" or whatever you want.
Problem here: CTRL-X is already used for the Windows "Cut" command, you don't want to override that.
If you would like to put an extra layer with Blender commands on your numpad, you can use your numpad's PGDOWN key as a special modifier key to shift to that layer. I recommend you rewire it not to control, but to the invisible "MOD9". Then you can define combos like MOD9+0 = Control+Alt+Spacebar, without interfering with any existing CTRL combos.
That would look like
REWIRE PGDOWN MOD9
COMBO 0 [...& .... ....] > moddedKey( SPACE + &.&. )
Now press PgDn + 0 ... voila, blender toggles fullscreen
The hardest part is figuring out, what exactly you want the keys to do...
Figuring out that &.&. represents "with LCTRL and LALT down" is confusing at first but not really hard.
Good luck, and don't forget to create stuff in Blender :)
… On 4. Sep 2024, at 18:13, PeterP1975 ***@***.***> wrote:
F24 in my case should work as another modifier key (like ctr, shift, alt). Blender compared to eg 3ds Max has a lot of keybindings (I mean A LOT - with new Blender 4.2 extension platform for example letter "t" has 26 bindings and this is not an exception "r"is about 27..)
Another thing: 2 BT HID devices: I needed Numpad to be on the left side of the keyboard. Right side Numpad's location is totally useles as my right hand uses mouse, my left hand uses left located numpad and BT keyboard.
Anyway:
cajhin = God Like Person
My config now:
GLOBAL StartInTraybar
GLOBAL startAHK
[CONFIG_1]
OPTION ConfigName K35
OPTION includeDeviceID pid&7021&
REWIRE 1 NP1
REWIRE 2 NP2
REWIRE 3 NP3
REWIRE 4 NP4
REWIRE 5 NP5
REWIRE 6 NP6
REWIRE 7 NP7
REWIRE 8 NP8
REWIRE 9 NP9
REWIRE 0 NP0
REWIRE , NP,
REWIRE . NP.
REWIRE = F13
REWIRE TAB NUMLOCK
REWIRE RET NPRET
Numpad keys works flawleslly (Blender reads it properly).
Issues:
As You see I used key labels from Numpad rather than it's keycodes to rewire (trial & error). I assume that capsicain reads keycodes not quite right. (the same with Monitor.ahk, but different keycodes)
There are some strange keys on this China piece of ... (Numpad I meant): for example HOW to rewire double 0 key ("00" - there is separate "00" key: pressing it once causes double "0" action) to for example ctrl (Yes: new Blender extension adds new custom orientation and its binded to Numpad 0-9 keys WITH a modifier key). I read manual and I understood nothing, too technical for me, especially combos and MOD keys.
??
—
Reply to this email directly, view it on GitHub <#115 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABBEBJQRT6BCGS5JD5PZJGTZU4WSVAVCNFSM6AAAAABNMZR6XSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRZGQ3TQNJWGQ>.
You are receiving this because you commented.
|
Hi,
Sorry for asking on this forum, I know its AutoHotInterception related, but maybe its possible to make it in Capsicain only???
Setup: 2 BT devices: K380 logitech keyboard, 2nd is numpad from China that sends wrong keycodes (Keycodes 0-9 = the same in logitech keyboard number row). Lack of proper keycodes on numpad made me to remap numpad keys to proper ones: Numpad1, Numpad2 instead of 1, 2 etc. No changes to K380 logitech keyboard.
So far i have:
#SingleInstance force
Persistent
#include Lib\AutoHotInterception.ahk
AHI := AutoHotInterception()
keyboardId := AHI.GetKeyboardIdFromHandle("HID{00001124-0000-1000-8000-00805f9b34fb}_VID&000204e8_PID&7021&Col01")
AHI.SubscribeKeyboard(keyboardId, true, KeyEvent)
return
WHAT NEXT?
How to remap, i only have isolated keyboard (numpad) number.. OR How to rewire numpad keyboard using Capsicain??
Cheers
Peter
The text was updated successfully, but these errors were encountered: