[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FR-devel] Added new plugin
From: |
Rich Kilmer |
Subject: |
[FR-devel] Added new plugin |
Date: |
Wed, 23 Oct 2002 01:42:31 -0400 |
Added new KeyManager plugin under the System_Commands subsystem. I was
getting a bit worried that we had all these key bindings mixed into
defining commands for menus...so I created the KeyManager to manage
Commands to Keys.
Usage:
key_mgr = plugin['/system/ui/keys'].manager
key_mgr.bind("App/File/Open", :ctrl, :O)
and...
keys = key_mgr.get_binding("App/File/Open")
# keys = [:ctrl, :O]
The three modifiers it knows about are :alt, :ctrl and :shift.
The bindings are stored as subslots like:
plugin['/system/ui/keys/Ctrl/Shift/S'].data #=> 'App/File/SaveAs'
The centralization of key to command mappings will allow us to create a
tool for the user to use to map keys. Also, non menu-based commands
will be able to be executed by mapping keys. This will enable simple
macro capabilities.
Will now move over to the Debugger and DockPane...I promise ;-)
-rich
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [FR-devel] Added new plugin,
Rich Kilmer <=