gcmd-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gcmd-dev] User configurable shortcuts


From: Piotr Eljasiak
Subject: [gcmd-dev] User configurable shortcuts
Date: Mon, 26 Mar 2007 22:52:29 +0200

Hi folks,

Here it is - user defined shortcuts. Finally got it working ;o)

Key bindings reside in [key-bindings] section in gcmd config file
(~/.gnome2/gnome-commander). Currently there is no GUI for key
configuration.

The shortcuts are read at start-up only, so you have to reload
application to see the changes.

Config file syntax:

    [<shift>][<control>][<alt>]key_name=action[|options]

eg.

    <ctrl>m=file.advrename
    <ctrl>t=file.advrename
    <shift><ctrl>f5=file.create_symlink
    <ctrl>0=bookmarks.goto|/media/dvd

Entries containing invalid key or user action are reported in console
and then ignored by gcmd.
User defined shortcuts are being processed AFTER handling of
'hard-coded' keys, so some shortcuts can't be redefined.

Notes:

        1. It's possible to assign one action to more than one key
        2. There is no distinction between lower and upper key
        (<ctrl>a=<ctrl>A)
        3. Key and action names are case insensitive (but not
        options!!!)
        
A few key bindings have been removed from code:

    <alt>f3=file.external_view
    <alt>f7=edit.search
    <control><shift>f=connections.close_current
    <control><shift>f5=file.create_symlink
    <control>a=mark.select_all
    <control>d=bookmarks.edit
    <control>g=connections.ftp_quick_connect
    <control>f=connections.ftp_connect
    <control>m=file.advrename
    <control>o=options.edit
    <control>r=view.refresh
    <control>t=file.advrename
    <control>f12=edit.filter
    <control>equal=mark.select_all
    <control>minus=mark.unselect_all
    <control>kp.add=mark.select_all
    <control>kp.subtract=mark.unselect_all
    <shift>f3=file.internal_view

Now gcmd looks for the above actions in config, and if any one is
missing - it will be redefined with its defaults.
First run of gcmd creates all necessary key bindings (just not to lose
already existing functionality), and then user is free to modify them
accordingly to ones needs.

List of currently available actions:

    bookmarks.add_current
    bookmarks.edit
    bookmarks.goto (not working yet)
    connections.close
    connections.close_current
    connections.ftp_connect
    connections.ftp_quick_connect
    edit.copy
    edit.copy_filenames
    edit.cut
    edit.delete
    edit.filter
    edit.paste
    edit.quick_search
    edit.search
    file.advrename
    file.chmod
    file.chown
    file.copy
    file.create_symlink
    file.diff
    file.edit
    file.exit
    file.external_view
    file.internal_view
    file.mkdir
    file.move
    file.properties
    file.rename
    file.view
    help.about
    help.help
    help.keyboard
    help.problem
    help.web
    mark.compare_directories
    mark.select_all
    mark.toggle
    mark.toggle_and_step
    mark.unselect_all
    options.edit
    options.edit_mime_types
    plugins.configure
    plugins.execute_python
    view.back
    view.equal_panes
    view.first
    view.forward
    view.last
    view.refresh
    view.up

The list can be expanded (or shortened) on user request ;o)


List of key

        a..z, 0..9
        
        ampersand, apostrophe, asciicircum, asciitilde, asterisk, at,
        backslash, bar, braceleft, braceright, bracketleft,
        bracketright, colon, comma, dollar, equal, exclam, greater,
        less, minus, numbersign, parenleft, parenright, percent, period,
        plus, question, quotedbl, quoteleft, quoteright, semicolon,
        slash, space, underscore
        
        f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
        f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, f25, f26, f27,
        f28, f29, f30, f31, f32, f33, f34, f35
        
        kp.0, kp.1, kp.2, kp.3, kp.4, kp.5, kp.6, kp.7, kp.8, kp.9,
        kp.add, kp.begin, kp.decimal, kp.delete, kp.divide, kp.down,
        kp.end, kp.enter, kp.equal, kp.f1, kp.f2, kp.f3, kp.f4, kp.home,
        kp.insert, kp.left, kp.multiply, kp.next, kp.page.down,
        kp.page.up, kp.prior, kp.right, kp.separator, kp.space,
        kp.subtract, kp.tab, kp.up 
        ('kp' stands for keypad)
        
        caps.lock, num.lock, scroll.lock, shift.lock
        
        backspace, begin, break, cancel, clear, codeinput, delete, down,
        eisu.shift, eisu.toggle, end, escape, execute, find,
        first.virtual.screen, help, home, hyper.l, hyper.r, insert,
        last.virtual.screen, left, linefeed, menu, meta.l, meta.r,
        mode.switch, multiplecandidate, multi.key, next,
        next.virtual.screen, page.down, page.up, pause,
        previouscandidate, prev.virtual.screen, print, prior, redo,
        return, right, script.switch, select, singlecandidate, super.l,
        super.r, sys.req, tab, terminate.server, undo, up

The list is based on GDK key symbols taken from gdkkeysyms.h (for
details refer to http://svn.gnome.org/viewcvs/*checkout*/gtk%
2B/trunk/gdk/gdkkeysyms.h?content-type=text%2Fplain)


Enjoy,
Piotr





reply via email to

[Prev in Thread] Current Thread [Next in Thread]