KinesisCorporation / Adv360-Pro-ZMK

Production repository for the all-new Advantage360 Professional using ZMK engine
MIT License
446 stars 6.41k forks source link

Cannot map calc hotkey as in Advantage 2 under KP+F7 #522

Closed AntoniMarcinek closed 2 months ago

AntoniMarcinek commented 2 months ago

Hello,

I am trying to map Calculator hotkey to one of extra keys in Advantage 360 Pro to get the same behaviour as with Advantage 2 when pressing KP+F7. I tried both &kp C_AL_CALCULATOR and &kp K_CALCULATOR bindings, but none of these emit what KP+F7 emits. What can I do? Is there a way to check what numerical code is Advantage 2 emitting with KP+F7?

Best regards, Antoni

ReFil commented 2 months ago

A tool such as hid-recorder can tell you the exact key codes. Have you tried enabling nkro extended reporting in adv360_left_defconfig?

AntoniMarcinek commented 2 months ago

I will try the hid-recorder. Now I tested with CONFIG_ZMK_HID_KEYBOARD_EXTENDED_REPORT=y, but it doesn't help. I do not know if it matters, but I am adding this to the fn layer. Maybe I should also try the base layer?

ReFil commented 2 months ago

The layer doesn't matter at all

KinesisCorporation commented 2 months ago

FWIW its probably worthwhile to try putting it in the top layer initially just to rule out a possible issue with accessing the other layer

AntoniMarcinek commented 2 months ago

The problem was CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y. Switched to CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_FULL=y and &kp C_AL_CALCULATOR started to work as expected. Thank you for pointing me to the NKRO, that allowed me to find the problematic option.

KinesisCorporation commented 2 months ago

You seem to be combining syntax from the ZMK Pro version and the SmartSet USB version.

All of this is SmartSet only...

[tab]>[app] [hk1]>[cxxs] [hk3]>[keyt] [esc]>[lshf] [hk2]>[lctr] [hk4]>[rctr] [lctr]>[lmou] [lalt]>[rmou] [rwin]>[rshf] [del]>[tab] [home]>[esc] [pgup]>[rwin] [end]>[F4] [pgdn]>[ralt]

&kp LC(C) &kp LC(V) &kp LC(X) [hk3]>[deft] [lshf]>[defs]
AntoniMarcinek commented 2 months ago

@KinesisCorporation I don't understand what do you mean. Where did I combine syntax from the 2 versions?

Anyway I reopened, because CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_FULL=y enables &kp C_AL_CALCULATOR only through USB. While using Bluetooth, it doesn't work. Could it be that it is somehow associated with CONFIG_ZMK_BLE_CONSUMER_REPORT_QUEUE_SIZE (just a guess based on the fact that this option is for Bluetooth and that it says something about CONSUMER_REPORT)?

KinesisCorporation commented 2 months ago

Whoops, got two Github notifications at once. Sorry!

KinesisCorporation commented 2 months ago

@KinesisCorporation I don't understand what do you mean. Where did I combine syntax from the 2 versions?

Anyway I reopened, because CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_FULL=y enables &kp C_AL_CALCULATOR only through USB. While using Bluetooth, it doesn't work. Could it be that it is somehow associated with CONFIG_ZMK_BLE_CONSUMER_REPORT_QUEUE_SIZE (just a guess based on the fact that this option is for Bluetooth and that it says something about CONSUMER_REPORT)?

That's a good question for @ReFil

ReFil commented 2 months ago

As per https://zmk.dev/docs/features/bluetooth#refreshing-the-hid-descriptor

If you change some HID related configuration options you need to unpair and re-pair on host and device. That should rectify the problem

AntoniMarcinek commented 2 months ago

@ReFil Thank you! I realised that I didn't set the CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_FULL=y in the right defconfig. After doing this everything started to work even without re-pairing. I did re-pair anyway just in case. Is there any info stating which options should be put in both defconfigs and which can go just to the left one?