Custom Keyboard Shortcuts in Gnome (Solved)

Philip A. Chapman pchapman at pcsw.us
Thu Jun 3 05:57:32 UTC 2004


On Wed, 2004-06-02 at 23:10, Philip A. Chapman wrote:
> Everyone,
> 
> Is it possible to create custom actions and assign a shortcut to it? 
> For instance, I'd like to have ctrl+alt+F run the command "xmms -f".  I
> have looked in the "Keyboard Shortcuts" item in the Preferences and do
> not see a solution there.  I've no problem with editing a config file or
> two if someone could point me in the right direction.
> 
> Thanks,

Everyone,

I finally figured out how to accomplish this.  I am responding to my
previous post in the hopes of helping someone else.  This is not a nice
hack, but it works OK for me.

Run gconf-editor (either form a terminal or the "Run Application" menu
item).  In the tree view on the left, expand "Apps", then "metacity". 
There are two key groups that you are concerned with,
"keybinding_commands" and "global_keybindings".

The group, "keybinding_commands" needs to be edited first.  Select that
group.  On the left, you will see names of key bindings in the "Name"
column and the actual command executed in the "Value" column.  Choose a
key/value pair that does not have a value.  I chose "command_2".  Double
click on the pair and enter the command to run in the "key value" field.

Now, back on the tree view on the left, select "global_keybindings".  In
the list of keys on the right find the key that corresponds to the
command you edited earlier.  Since I chose to use "command_2" before, I
edited the Value for "run_command_2".  In the "key value" field, enter
the key sequence you need.  Control+Alt+f is entered as "<Ctrl><Alt>f". 
By studying the key values of other commands, you should be able to
figure out what your mapping needs to be.  Look through all mappings to
ensure that the sequence you are setting up is not already in use.

Hope this helps someone,
-- 
Philip A. Chapman

Application Development:
Java, Visual Basic (MCP), PostgreSQL, MySQL, MSSQL
Linux, Windows 9x, Windows NT, Windows 2000, Windows XP
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20040603/afc71b3c/attachment-0001.sig>


More information about the fedora-list mailing list