pan-users
[Top][All Lists]
Advanced

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

[Pan-users] Re: customize keybindings


From: Duncan
Subject: [Pan-users] Re: customize keybindings
Date: Thu, 14 Sep 2006 19:21:28 +0000 (UTC)
User-agent: pan 0.112 (Elijah Craig)

Michael Wild <address@hidden> posted
address@hidden, excerpted below, on  Thu, 14 Sep 2006
10:19:04 +0200:

> i know how to customize the key bindings in pan (the method mentioned in
> the FAQ by pointing on the menu item and then pressing the key
> combination). however, this seems to work only for "modified" keys, not
> for unmodified ones (e.g. "Ctrl-a" works fine, "a" however doesn't). i can
> see that there are some unmodified keys assigned by default, so it should
> be possible... however, i can't seem to find where pan stores the key
> bindings (i couldn't find it in gconf and ~/.pan2). the only thing i came
> up with is the file ~/.pan2/accels.txt which is a dump of the key
> bindings.

Interesting.  I hadn't been able to get the GUI edit method to work with
new-pan, tho it worked with old-pan (0.14.x) just fine.  It's probably
that old gtk setting that I thought was no longer needed.

There are two different ways to address your question.

1)  In old-pan, and I assume in new-pan, adding unmodified accels using
the GUI method DID work, but there was one BIG exception.  Any accel
used as a /menu/ accel couldn't be added with the GUI, because it would
trigger the menu action instead and that took precedence.  As an example,
in the file menu, you couldn't add the "w" accel to any function, since
it's a /menu/ accel for "Work Online".  You could however add the "z"
accel, since it's not a menu accel in that menu, or "ctrl-w", since the
modifier cancels the menu accel effect.  You could also add "w" as an
accel on a different menu where it's not used as a menu accel.

2)  The file you mentioned, accels.txt, is indeed where pan stores the
accels.  Edit it and you edit pan's accel mapping.  Of course, you must
edit it with pan closed, or when you close the pan session with the
existing mappings, it'll overwrite the new ones you just saved.

There are some tricks to editing the file, however.  First,
beginning a line with a semicolon (;) indicates a comment -- pan ignores
that line.  All the default accels are commented, so don't forget to
remove that semicolon when you change them or pan will ignore the change.

Second, pan overwrites the file at every close with an unordered dump of
its existing accel mapping.  This means that editing it is a bit of a
challenge.  For just one or two changes, using your text editor's find
function is probably easiest.  For more systematic changes, it's
worthwhile to make a separate edit copy, reorder it to menu order or
whatever, and always make your changes there, then copy it over the pan
version so pan will pick up the changes next time it opens (and again
overwrite the nice formatting next time it closes, but that's fine, since
it's not your edit copy).

I have attached under my sig (using the pan-attach script I've posted in
the past, in text/identity mode) a copy of my accels.txt edit file, which
should be useful.  Even if you don't particularly like my accels scheme,
it's in menu order, saving you the hassle of duplicating my reordering
effort.  As well, it illustrates a couple useful techniques I've picked up
with experience.  Note the breaking up into sections by menu using comment
lines, and the used accels table at the bottom.  The latter was very
useful as I was setting up the scheme, making it easy to see which accels
were used and which were available for use, altho it does mean making
changes in two different places, the table and the actual accel, any time
I change something.

The scheme used is designed to be fairly simple.  The "a" accel with and
without modifier is used for two things, for instance, the traditional
ctrl-a select-all (ctrl-a for all article, add the alt for the alternate
function, all headers), and for "article", as in "a" for "next article",
shift-a (shift as negate/undo) for previous article, alt-a (alt again
indicates alt-function) for next /unread/ article, etc.  Similarly for
g=groups, t=threads, etc.  Again, you may or may not find the scheme
itself useful.  If not, it'll still be easier to modify this file than to
duplicate the time I spend reordering mine, and it does usefully
illustrate the section comment and accel table concepts.

Of course, once you switch to the manual edit file method over the gui
method, you can't use the GUI method for any permanent changes unless you
have no interest in using the manual method again, as the changes won't be
propagated back to the edit file.  You can of course still experiment with
a change using the GUI, and then erase or make the change permanent by
either overwriting the pan file with the edit file, or making the change
in the edit file.

Hope this has helped! =8^)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


; pan GtkAccelMap rc-file         -*- scheme -*-
; this file is an automated accelerator map dump

;###############################################################################
;###############################################################################
;###############################################################################
; (gtk_accel_path "<Actions>/Actions/file-menu" "")
; (gtk_accel_path "<Actions>/Actions/import-tasks" "<Control>o")
; (gtk_accel_path "<Actions>/Actions/cancel-last-task" "<Control>Delete")
; (gtk_accel_path "<Actions>/Actions/work-online" "l")
(gtk_accel_path "<Actions>/Actions/show-task-window" "<Control><Alt><Shift>t")
(gtk_accel_path "<Actions>/Actions/show-log-dialog" "<Control><Alt><Shift>l")
; (gtk_accel_path "<Actions>/Actions/quit" "<Control>q")
;###############################################################################
;###############################################################################
; (gtk_accel_path "<Actions>/Actions/edit-menu" "")
(gtk_accel_path "<Actions>/Actions/select-all-articles" "<Control><Alt>a")
(gtk_accel_path "<Actions>/Actions/add-subthreads-to-selection" 
"<Control><Shift>t")
(gtk_accel_path "<Actions>/Actions/add-threads-to-selection" "<Control>t")
(gtk_accel_path "<Actions>/Actions/add-similar-articles-to-selection" "")
(gtk_accel_path "<Actions>/Actions/unselect-all-articles" 
"<Shift><Alt><Control>a")
(gtk_accel_path "<Actions>/Actions/select-article-body" "<Control>a")
(gtk_accel_path "<Actions>/Actions/show-servers-dialog" 
"<Control><Alt><Shift>n")
(gtk_accel_path "<Actions>/Actions/show-profiles-dialog" 
"<Control><Alt><Shift>p")
(gtk_accel_path "<Actions>/Actions/show-preferences-dialog" "<Control>p")
(gtk_accel_path "<Actions>/Actions/show-group-preferences-dialog" 
"<Control><Alt><Shift>g")
;###############################################################################
;###############################################################################
; (gtk_accel_path "<Actions>/Actions/view-menu" "")
; (gtk_accel_path "<Actions>/Actions/show-toolbar" "")
;###############################################################################
; (gtk_accel_path "<Actions>/Actions/view-layout-menu" "")
; (gtk_accel_path "<Actions>/Actions/tabbed-layout" "z")
; (gtk_accel_path "<Actions>/Actions/jump-to-group-tab" "1")
; (gtk_accel_path "<Actions>/Actions/jump-to-header-tab" "2")
; (gtk_accel_path "<Actions>/Actions/jump-to-body-tab" "3")
; (gtk_accel_path "<Actions>/Actions/show-group-pane" "<Control>1")
; (gtk_accel_path "<Actions>/Actions/show-header-pane" "<Control>2")
; (gtk_accel_path "<Actions>/Actions/show-body-pane" "<Control>3")
;###############################################################################
; (gtk_accel_path "<Actions>/Actions/view-group-pane-menu" "")
; (gtk_accel_path "<Actions>/Actions/shorten-group-names" "b")
;###############################################################################
; (gtk_accel_path "<Actions>/Actions/view-header-pane-menu" "")
(gtk_accel_path "<Actions>/Actions/thread-headers" "<Control><Alt>t")
; (gtk_accel_path "<Actions>/Actions/show-matching-articles" "")
; (gtk_accel_path "<Actions>/Actions/show-matching-threads" "")
; (gtk_accel_path "<Actions>/Actions/show-matching-subthreads" "")
(gtk_accel_path "<Actions>/Actions/match-only-unread-articles" "r")
; (gtk_accel_path "<Actions>/Actions/match-only-cached-articles" "")
; (gtk_accel_path "<Actions>/Actions/match-only-binary-articles" "")
; (gtk_accel_path "<Actions>/Actions/match-only-my-articles" "")
; (gtk_accel_path "<Actions>/Actions/match-watched-articles" "")
; (gtk_accel_path "<Actions>/Actions/match-high-scoring-articles" "")
; (gtk_accel_path "<Actions>/Actions/match-medium-scoring-articles" "")
; (gtk_accel_path "<Actions>/Actions/match-normal-scoring-articles" "")
; (gtk_accel_path "<Actions>/Actions/match-low-scoring-articles" "")
; (gtk_accel_path "<Actions>/Actions/match-ignored-articles" "")
;###############################################################################
; (gtk_accel_path "<Actions>/Actions/view-body-pane-menu" "")
; (gtk_accel_path "<Actions>/Actions/wrap-article-body" "w")
; (gtk_accel_path "<Actions>/Actions/mute-quoted-text" "q")
; (gtk_accel_path "<Actions>/Actions/show-all-headers" "h")
(gtk_accel_path "<Actions>/Actions/rot13-selected-text" "")
; (gtk_accel_path "<Actions>/Actions/monospace-font-enabled" "c")
; (gtk_accel_path "<Actions>/Actions/show-smilies-as-graphics" "")
; (gtk_accel_path "<Actions>/Actions/show-text-markup" "")
; (gtk_accel_path "<Actions>/Actions/size-pictures-to-fit" "")
; (gtk_accel_path "<Actions>/Actions/smooth-scrolling" "")
;###############################################################################
; (gtk_accel_path "<Actions>/Actions/character-encoding-menu" "")
; (gtk_accel_path "<Actions>/Actions/charset-ISO-8859-4" "")
; (gtk_accel_path "<Actions>/Actions/charset-ISO-8859-13" "")
; (gtk_accel_path "<Actions>/Actions/charset-windows-1257" "")
; (gtk_accel_path "<Actions>/Actions/charset-ISO-8859-2" "")
; (gtk_accel_path "<Actions>/Actions/charset-windows-1250" "")
; (gtk_accel_path "<Actions>/Actions/charset-gb2312" "")
; (gtk_accel_path "<Actions>/Actions/charset-big5" "")
; (gtk_accel_path "<Actions>/Actions/charset-ISO-8859-5" "")
; (gtk_accel_path "<Actions>/Actions/charset-windows-1251" "")
; (gtk_accel_path "<Actions>/Actions/charset-KOI8-R" "")
; (gtk_accel_path "<Actions>/Actions/charset-KOI8-U" "")
; (gtk_accel_path "<Actions>/Actions/charset-ISO-8859-7" "")
; (gtk_accel_path "<Actions>/Actions/charset-ISO-2022-jp" "")
; (gtk_accel_path "<Actions>/Actions/charset-euc-kr" "")
; (gtk_accel_path "<Actions>/Actions/charset-ISO-8859-9" "")
; (gtk_accel_path "<Actions>/Actions/charset-ISO-8859-1" "")
; (gtk_accel_path "<Actions>/Actions/charset-ISO-8859-15" "")
; (gtk_accel_path "<Actions>/Actions/charset-windows-1252" "")
; (gtk_accel_path "<Actions>/Actions/charset-UTF-8" "")
;###############################################################################
;###############################################################################
; (gtk_accel_path "<Actions>/Actions/go-menu" "")
; (gtk_accel_path "<Actions>/Actions/read-more" "space")
; (gtk_accel_path "<Actions>/Actions/read-less" "BackSpace")
(gtk_accel_path "<Actions>/Actions/read-next-unread-group" "<Alt>g")
(gtk_accel_path "<Actions>/Actions/read-next-group" "g")
(gtk_accel_path "<Actions>/Actions/read-next-unread-article" "<Alt>a")
(gtk_accel_path "<Actions>/Actions/read-next-article" "a")
(gtk_accel_path "<Actions>/Actions/read-next-watched-article" "")
(gtk_accel_path "<Actions>/Actions/read-previous-article" "<Shift>a")
(gtk_accel_path "<Actions>/Actions/read-parent-article" "<Alt><Shift>a")
(gtk_accel_path "<Actions>/Actions/read-next-unread-thread" "<Alt>t")
(gtk_accel_path "<Actions>/Actions/read-next-thread" "t")
(gtk_accel_path "<Actions>/Actions/read-previous-thread" "<Shift>t")
;###############################################################################
;###############################################################################
; (gtk_accel_path "<Actions>/Actions/group-actions-menu" "")
; (gtk_accel_path "<Actions>/Actions/read-selected-group" "")
(gtk_accel_path "<Actions>/Actions/mark-groups-read" "")
; (gtk_accel_path "<Actions>/Actions/download-headers" "")
(gtk_accel_path "<Actions>/Actions/get-new-headers-in-selected-groups" 
"<Alt><Control>h")
(gtk_accel_path "<Actions>/Actions/get-new-headers-in-subscribed-groups" 
"<Control>h")
; (gtk_accel_path "<Actions>/Actions/subscribe" "")
; (gtk_accel_path "<Actions>/Actions/unsubscribe" "")
; (gtk_accel_path "<Actions>/Actions/refresh-group-list" "")
(gtk_accel_path "<Actions>/Actions/delete-groups-articles" "")
;###############################################################################
;###############################################################################
; (gtk_accel_path "<Actions>/Actions/article-actions-menu" "")
; (gtk_accel_path "<Actions>/Actions/save-articles" "<Shift>s")
; (gtk_accel_path "<Actions>/Actions/read-selected-article" "")
(gtk_accel_path "<Actions>/Actions/download-selected-article" "d")
; (gtk_accel_path "<Actions>/Actions/mark-article-read" "m")
(gtk_accel_path "<Actions>/Actions/mark-article-unread" "<Shift>m")
(gtk_accel_path "<Actions>/Actions/view-article-score" "s")
(gtk_accel_path "<Actions>/Actions/add-article-score" "<Control>s")
; (gtk_accel_path "<Actions>/Actions/watch-thread" "")
; (gtk_accel_path "<Actions>/Actions/ignore-thread" "")
; (gtk_accel_path "<Actions>/Actions/plonk" "")
(gtk_accel_path "<Actions>/Actions/print" "")
; (gtk_accel_path "<Actions>/Actions/delete-article" "Delete")
;###############################################################################
;###############################################################################
; (gtk_accel_path "<Actions>/Actions/posting-actions-menu" "")
; (gtk_accel_path "<Actions>/Actions/post" "p")
; (gtk_accel_path "<Actions>/Actions/followup" "f")
(gtk_accel_path "<Actions>/Actions/reply-to" "")
; (gtk_accel_path "<Actions>/Actions/supersede-article" "")
; (gtk_accel_path "<Actions>/Actions/cancel-article" "")
;###############################################################################
;###############################################################################
; (gtk_accel_path "<Actions>/Actions/help-menu" "")
; (gtk_accel_path "<Actions>/Actions/pan-web-page" "")
; (gtk_accel_path "<Actions>/Actions/tip-jar" "")
; (gtk_accel_path "<Actions>/Actions/bug-report" "")
; (gtk_accel_path "<Actions>/Actions/about-pan" "")
;###############################################################################
;###############################################################################
;###############################################################################
; ********* Used Accel table *********
; Char  Pln     Ctl     Shf     CtlShf  Alt     CtlAlt  AltShf  CtlAltSh
; a     a       c-a     s-a             a-a     ca-a    as-a    cas-a
; b     b                                                       
; c     c                                                       
; d     d                                                       
; e                                                             
; f     f                                                       
; g     g                               a-g                     cas-g
; h     h       c-h                             ca-h            
; i                                                             
; j                                                             
; k                                                             
; l     l                                                       cas-l
; m     m               s-m                                     
; n                                                             cas-n
; o             c-o                                             
; p     p       c-p                                             cas-p
; q     q       c-q                                             
; r     r                                                       
; s     s       c-s     s-s                                     
; t     t       c-t     s-t     cs-t    a-t     ca-t            cas-t
; u     u                                                       
; v     v                                                       
; w     w                                                       
; x                                                             
; y                                                             
; z     z                                                       
; backtick doesn't work
; 1     1       c-1                                             
; 2     2       c-2                                             
; 3     3       c-3                                             
; 4                                                             
; 5                                                             
; 6                                                             
; 7                                                             
; 8                                                             
; 9                                                             
; 0                                                             
; -                                                             
; =                                                             
; home  home                                                    
; end   end                                                     
; pgup  pgup                                                    
; pgdn  pgdn                                                    
; ins                                                           
; del   del     c-del                                           
; spc   spc                                                     
; bs    bs                                                      
; tab   tab                                                     
; cr    cr                                                      
; esc   esc                                                     
; f1                                                            
; f2                                                            
; f3                                                            
; f4                                                            
; f5                                                            
; f6                                                            
; f7                                                            
; f8                                                            
; f9                                                            
; f10                                                           
; f11                                                           
; f12                                                           
; [                                                             
; ]                                                             
; \                                                             
; ;                                                             
; '                                                             
; ,                                                             
; .                                                             
; /





reply via email to

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