fix KC["_"] resolving to BLE_REFRESH
This commit is contained in:
parent
03d5f7ae10
commit
357165c14b
@ -189,7 +189,7 @@ class KeyAttrDict:
|
|||||||
)
|
)
|
||||||
elif key in ('HID_SWITCH', 'HID'):
|
elif key in ('HID_SWITCH', 'HID'):
|
||||||
make_key(names=('HID_SWITCH', 'HID'), on_press=handlers.hid_switch)
|
make_key(names=('HID_SWITCH', 'HID'), on_press=handlers.hid_switch)
|
||||||
elif key in ('BLE_REFRESH'):
|
elif key in ('BLE_REFRESH',):
|
||||||
make_key(names=('BLE_REFRESH',), on_press=handlers.ble_refresh)
|
make_key(names=('BLE_REFRESH',), on_press=handlers.ble_refresh)
|
||||||
else:
|
else:
|
||||||
maybe_key = first_truthy(
|
maybe_key = first_truthy(
|
||||||
|
@ -239,6 +239,9 @@ class TestKeys_get(unittest.TestCase):
|
|||||||
created = make_key(names=('ThIs_Is_A_StRaNgE_kEy',))
|
created = make_key(names=('ThIs_Is_A_StRaNgE_kEy',))
|
||||||
assert created is KC.get('ThIs_Is_A_StRaNgE_kEy')
|
assert created is KC.get('ThIs_Is_A_StRaNgE_kEy')
|
||||||
|
|
||||||
|
def test_underscore(self):
|
||||||
|
assert KC.get('_')
|
||||||
|
|
||||||
|
|
||||||
# Some of these test appear silly, but they're testing we get the
|
# Some of these test appear silly, but they're testing we get the
|
||||||
# same, single, instance back when requested through KC and that
|
# same, single, instance back when requested through KC and that
|
||||||
|
Loading…
x
Reference in New Issue
Block a user