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
Keywords
User Preferences, Key Configuration, Key Map, Key Map Item, Key Map Item Operator, Key Map Item Operator Properties

satishgoda at gmail dot com

Popular posts from this blog

Blender 2.64 - Tutorial - Intro to Masking (Rotoscoping)

Hello OSL

Render Wedges using the Blender Video Sequence Editor