Limit BT_HSTx keycode works in bluetooth mode only
This commit is contained in:
parent
485e45ea67
commit
6829fbd074
1 changed files with 9 additions and 7 deletions
|
|
@ -110,6 +110,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
return false; // Skip all further processing of this key
|
return false; // Skip all further processing of this key
|
||||||
#ifdef BLUETOOTH_ENABLE
|
#ifdef BLUETOOTH_ENABLE
|
||||||
case BT_HST1 ... BT_HST3:
|
case BT_HST1 ... BT_HST3:
|
||||||
|
if (get_transport() == TRANSPORT_BLUETOOTH) {
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
host_idx = keycode - BT_HST1 + 1;
|
host_idx = keycode - BT_HST1 + 1;
|
||||||
chVTSet(&pairing_key_timer, TIME_MS2I(2000), (vtfunc_t)pairing_key_timer_cb, &host_idx);
|
chVTSet(&pairing_key_timer, TIME_MS2I(2000), (vtfunc_t)pairing_key_timer_cb, &host_idx);
|
||||||
|
|
@ -118,6 +119,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
host_idx = 0;
|
host_idx = 0;
|
||||||
chVTReset(&pairing_key_timer);
|
chVTReset(&pairing_key_timer);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case BAT_LVL:
|
case BAT_LVL:
|
||||||
if (get_transport() == TRANSPORT_BLUETOOTH && !usb_power_connected()) {
|
if (get_transport() == TRANSPORT_BLUETOOTH && !usb_power_connected()) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue