Switch between Console and Text Editors
Since the Text editor and Console editor are very integral to my workflow, today I decided to configure my user preferences so that switching between them is as simple as pressing a hotkey (my choice being SHIFT+ESC)
Also tried adding the switching functionality using a little bit of python as well.
keyconfig = bpy.context.window_manager.keyconfigs.user
args = ('wm.context_set_enum', 'ESC', 'PRESS')
kwargs = {'shift':True}
for source, destination in (('Console', 'TEXT_EDITOR'), ('Text', 'CONSOLE')):
kmi = keyconfig.keymaps.[source].keymap_items.new(*args, **kwargs)
properties = kmi.properties
properties.data_path = 'area.type'
properties.value = destination
Links and References
- Doc:2.6/Manual/Preferences/Input#Keymap_editor
- documentation/blender_python_api_2_70_release/bpy.types.KeyConfigurations
Keywords
satishgoda at gmail dot com
User Preferences, Key Configuration, Key Map, Key Map Item, Key Map Item Operator, Key Map Item Operator Properties
Comments
Post a Comment
Your comments are very much appreciated. Thank You.