Home Download Buy Blog Forum Support

Dynamic Key Bindings?

Dynamic Key Bindings?

Postby DavidLGoldberg on Fri Mar 22, 2013 9:24 am

Is there a way to dynamically bind keys?

Or basically set up a time frame in which bindings are active?
DavidLGoldberg
 
Posts: 11
Joined: Sat Mar 16, 2013 2:57 pm

Re: Dynamic Key Bindings?

Postby facelessuser on Fri Mar 22, 2013 1:36 pm

I have been working on a plugin for personal use that can do common keybinding things like keybinding profiles, or keybinding only for a platform, or keybinding only for a hostname, and I added timeframe:

https://github.com/facelessuser/sublime ... ut_plus.py
The thread is here: viewtopic.php?f=5&t=9931&start=0&hilit=shortcutplus

    {
"keys": ["ctrl+shift+alt+p"],
"command": "get_selection_scope",
"context": [{"key": "shortcut_plus(timeframe):7:00 - 8:00"}]
},


You can play with it. It might have bugs in the timeframe stuff because I literally threw it together, but in general, that is the concept and everything else is very stable.
facelessuser
 
Posts: 1571
Joined: Tue Apr 05, 2011 7:38 pm

Re: Dynamic Key Bindings?

Postby KonTrax on Tue Mar 26, 2013 8:13 am

You can add any keybinding related ideas to the multibind plugin topic (here) and I'll look into including it in the next update. Can never get enough ideas.

BeA
KonTrax
 
Posts: 46
Joined: Sun Mar 17, 2013 10:24 am

Re: Dynamic Key Bindings?

Postby facelessuser on Tue Mar 26, 2013 7:32 pm

@KonTrax Feel free to steal any ideas you see in mine. I do plan to switch over to yours eventually.
facelessuser
 
Posts: 1571
Joined: Tue Apr 05, 2011 7:38 pm

Re: Dynamic Key Bindings?

Postby KonTrax on Wed Mar 27, 2013 4:43 pm

@facelessuser: Now that's something you don't hear everyday. Shall look into it.
KonTrax
 
Posts: 46
Joined: Sun Mar 17, 2013 10:24 am

Re: Dynamic Key Bindings?

Postby facelessuser on Wed Mar 27, 2013 7:00 pm

Let's be honest, I'm not doing anything you haven't already figured out :).
facelessuser
 
Posts: 1571
Joined: Tue Apr 05, 2011 7:38 pm


Return to Plugin Development

Who is online

Users browsing this forum: alkuzad and 7 guests