Sublime Forum

Dynamic Key Bindings?

#1

Is there a way to dynamically bind keys?

Or basically set up a time frame in which bindings are active?

0 Likes

#2

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:

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

[pre=#2D2D2D] {
“keys”: “ctrl+shift+alt+p”],
“command”: “get_selection_scope”,
“context”: {“key”: “shortcut_plus(timeframe):7:00 - 8:00”}]
},[/pre]

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.

0 Likes

#3

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

0 Likes

#4

@KonTrax Feel free to steal any ideas you see in mine. I do plan to switch over to yours eventually.

0 Likes

#5

@facelessuser: Now that’s something you don’t hear everyday. Shall look into it.

0 Likes

#6

Let’s be honest, I’m not doing anything you haven’t already figured out :smile:.

0 Likes