feat(patch): change remaps
removed backspace/backslash swap, remapped capslock to fn instead of ctrl TODO: find and set fn key id/mappingfn-hooks-wip-mine
parent
52a92c70e5
commit
113b172e3d
16
patch.py
16
patch.py
|
|
@ -63,9 +63,10 @@ scancode_table2 = [0x00, 0x35, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23,
|
|||
|
||||
# See README for full id => key mapping
|
||||
key_id_ctrl = 17
|
||||
key_id_caps = 20
|
||||
key_id_backspace = 112
|
||||
key_id_backslash = 117
|
||||
key_id_fn = 0
|
||||
# key_id_caps = 20
|
||||
# key_id_backspace = 112
|
||||
# key_id_backslash = 117
|
||||
|
||||
# Hex offsets to scancode tables in the raw original fw. These tables
|
||||
# will be overwritten by our modified tables above
|
||||
|
|
@ -111,12 +112,13 @@ def write_handle_fn_key_handler_hooks():
|
|||
dest.write('b01302a8'.decode('hex'))
|
||||
|
||||
if __name__ == '__main__':
|
||||
# Remap caps to ctrl
|
||||
scancode_table1[key_id_caps] = scancode_table1[key_id_ctrl]
|
||||
# Remap caps to fn
|
||||
# scancode_table1[key_id_caps] = scancode_table1[key_id_ctrl]
|
||||
scancode_table1[key_id_caps] = scancode_table1[key_id_fn]
|
||||
|
||||
# Switch down backspace to \ and \ to backspace
|
||||
scancode_table1[key_id_backspace], scancode_table1[key_id_backslash] = \
|
||||
scancode_table1[key_id_backslash], scancode_table1[key_id_backspace]
|
||||
# scancode_table1[key_id_backspace], scancode_table1[key_id_backslash] = \
|
||||
# scancode_table1[key_id_backslash], scancode_table1[key_id_backspace]
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Patch utility for Novatouch TKL firmware')
|
||||
|
|
|
|||
Loading…
Reference in New Issue