From: Carsten H. (T. R. <ra...@ra...> - 2003-10-27 21:50:55
|
On Mon, 27 Oct 2003 07:54:08 -0500 BAM <so...@gm...> babbled: > Due to E16's poor support for Xnest (read: X crashes), I found myself > using pekwm. i might be inclined to rephrase that as "due to xnest being unstable and buggy, i decided to change software unrelated to its real stability issues just to avoid the problem, and not to help fix it". if xnest crashes - guess what? it's xnest's fault. i use xnest often - and it works well most of the time, has some weird behaviors and has some severe performance issues. on the other hand E isnt perfect - it crashes too :) but thats not the problem at hand :) > Don't think I'll switch my main desktops, but there are two features I > really like: tabs and keychains/maps (like C-x or C-c in Emacs). > Keymapping was easier to write, so here goes. > > This is just a simple first effort: > > Working: > * It compiles. :) > * It does actions only if their keymap is currently active, and > doesn't do them if it isn't. > * The base keymap is reactivated correctly. > * Nested keymaps are (sort of) possible. > * Events with actions in inactive keychains should not have their > keys grabbed. > * Probably mouse buttons. But anyone who'd put a mouse in a keychain > is crazy! > > Buggy: > * If you want to use something like focus_next with it that will > repeat in the keymap you have to put a BEGIN_CHAIN action along > with the action you plan to repeat. (probably not fixable) > > How to use: > * The action "__A_BEGIN_CHAIN n" begins a chain by changing the > current keymap to n. > * A key definition can have one "__KEYMAP n" part (0 is the default). > The action will then only run if the current keymap is keymap n. > * Keymap names are #define'd numbers like everything else in e > config, not strings. > > Example: > __NEXT_ACTION > __KEY F12 > __EVENT __KEY_PRESS > __ACTION __A_GOTO_DESK 1 > __NEXT_ACTION > __KEY F1 > __EVENT __KEY_PRESS > __ACTION __A_BEGIN_CHAIN 1 > __NEXT_ACTION > __KEY F2 > __KEYMAP 1 > __EVENT __KEY_PRESS > __ACTION __A_FOCUS_NEXT > > Result: F2 will only change focus if you hit F1 first. F1 then F12 does > nothing. > > -- > BAM - Open head, insert foot. > -- --------------- Codito, ergo sum - "I code, therefore I am" -------------------- The Rasterman (Carsten Haitzler) ra...@ra... 熊耳 - 車君 ra...@de... Mobile Phone: +61 (0)413 451 899 Home Phone: 02 9698 8615 |