On 18 March 2013 21:45, Guillermo Polito <guillermopolito@gmail.com> wrote:
- Keymappings 101 tuto in blog (for 2.0, cause in 3.0 the api coould change a bit :)

I just read your post��� question: is it possible to define semi-modal sequences?

Let me explain: modes are (hidden) states in the system that influence how it interprets inputs. Typical example is capslock: depending on its state, pressing the A key will give you a or A.

Having too many or unclear modes is bad, because you have to track their state in your mind, or take a specific action to know which mode you're in. In contrast, a semi-mode is when you need continuous physical action to maintain it; typical example is the modifier keys like shift alt ctrl��� Semi-modes are a much better compromise (ideally there would be no modes anywhere, but that's not very realistic in practice).

To get back to my point, a semi-modal sequence would be:

($a asShortcut, $b asShortcut) ctrl "[press ctrl] a b [release ctrl]"

as opposed to:
$a asShortcut ctrl, $b asShortcut ctrl "maybe release ctrl in the middle"

where if you press ctrl-a and get interrupted, you're going to be confused when ctrl-b does not do what it's supposed to do as a standalone shortcut��� if you're an emacs user, think ctrl-G, if you're a vim user, think spurious i's in your files���

--
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet