Block out basic keycodes

This commit is contained in:
zvecr 2022-05-09 23:51:43 +01:00
parent 218bd48ebc
commit ea92d5ed7d
3 changed files with 1309 additions and 7 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,10 @@
{
version: 0.1.0
uses: {
keycodes: 0.0.1
}
documentation: {
order: [
broadcast_messages

View file

@ -4,17 +4,17 @@ import cmd
import json
import random
import gzip
from pathlib import Path
from platform import platform
from milc import cli
KEYCODE_MAP = {
# TODO: this should be data driven...
0x04: 'KC_A',
0x05: 'KC_B',
0x29: 'KC_ESCAPE',
0xF9: 'KC_MS_WH_UP',
}
from qmk.json_schema import json_load
# TODO: get from xap "uses" for the current device
keycode_version = '0.0.1'
spec = json_load(Path(f'data/constants/keycodes_{keycode_version}.json'))
KEYCODE_MAP = {int(k, 16): v.get('key') for k, v in spec['keycodes'].items()}
def _is_xap_usage(x):