Created
September 24, 2017 01:12
-
-
Save AutomateAaron/fe831ff0e9f4f379af84ad245c777724 to your computer and use it in GitHub Desktop.
A Text Block that converts the default key mapping from qwerky to dvorak.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### WARNING: ONLY RUN ONCE! | |
import bpy | |
print('-----------') | |
q_to_d = { | |
'MINUS': 'LEFT_BRACKET', | |
'EQUAL': 'RIGHT_BRACKET', | |
'Q': 'QUOTE', | |
'W': 'COMMA', | |
'E': 'PERIOD', | |
'R': 'P', | |
'T': 'Y', | |
'Y': 'F', | |
'U': 'G', | |
'I': 'C', | |
'O': 'R', | |
'P': 'L', | |
'LEFT_BRACKET': 'SLASH', | |
'RIGHT_BRACKET': 'EQUAL', | |
# 'BACK_SLASH': 'BACK_SLASH', | |
# 'A': 'A', | |
'S': 'O', | |
'D': 'E', | |
'F': 'U', | |
'G': 'I', | |
'H': 'D', | |
'J': 'H', | |
'K': 'T', | |
'L': 'N', | |
'SEMI_COLON': 'S', | |
'QUOTE': 'MINUS', | |
'Z': 'SEMI_COLON', | |
'X': 'Q', | |
'C': 'J', | |
'V': 'K', | |
'B': 'X', | |
'N': 'B', | |
# 'M': 'M', | |
'COMMA': 'W', | |
'PERIOD ': 'V', | |
'SLASH': 'Z', | |
} | |
wm = bpy.context.window_manager | |
default = wm.keyconfigs['Blender'] | |
dopesheet = default.keymaps['Dopesheet'] | |
for keymap in default.keymaps: | |
print('---- {} ----'.format(keymap.name)) | |
for keymap_item in keymap.keymap_items: | |
if keymap_item.type in q_to_d: | |
print('Changed: {:20.20} -> {:>20.20}:{}'.format(keymap_item.name, keymap_item.type, q_to_d[keymap_item.type])) | |
keymap_item.type = q_to_d[keymap_item.type] | |
#qwerty = "-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./" | |
#dvorak = "[]',.pyfgcrl/=\\aoeuidhtns-;qjkxbmwvz" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment