[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mon, 26 Jan 2009 09:12:11 +0100 (CET)
>>> It would be really cool if gnu-screen could receive mouse wheel events
>>> and translate them to Command-Esc and ^Y or ^E as appropriate.
>> Possibly it could be more intelligent about handling mouse wheel events
>> when *already* in copy mode (^A^[).
> There could be a switch for users to decide whether they want their
> mouse events passed to the app or used by screen.
At work, I'm using AutoHotkey (anyone tied to windows on the desktop will
probably benefit from AutoHotkey, or a program like it. Look it up) to
sent something else than the default 'escape' code when I press keys on
the numberpad area of my keyboard. e.g. "PgUp" becomes <esc>[NumpadPgUp].
On the screen side, I catch these pseudo-escape codes and do something
interesting with them. Examples:
# escape sequences from the keypad.
bindkey ^[[NumpadPgUp] eval "copy" "stuff \"^u\"" # page-up goes to copy mode
bindkey ^[[NumpadPgDn] eval "copy" # page-down goes to copy mode
bindkey -m ^[[NumpadPgUp] stuff "^u" # page-up sends page-up in copy mode
bindkey -m ^[[NumpadPgDn] stuff "^d" # page-down sends page-down in copy mode
bindkey ^[[NumLock] stuff "\033"
bindkey ^[[NumpadEnter] stuff "\012"
bindkey ^[[NumpadClear] screen
bindkey ^[[NumpadRight] next
bindkey ^[[NumpadLeft] prev
bindkey ^[[NumpadDown] focus down
bindkey ^[[NumpadUp] focus up
bindkey ^[[NumpadDiv] eval "split" "fit"
bindkey ^[[NumpadMult] eval "only" "split" "split" "split" "select 0"
"fit" "focus down" "select 1" "fit" "focus down" "select 2" "fit" "focus
down" "select 3" "fit" "focus down"
bindkey ^[[NumpadSub] remove
bindkey ^[[NumpadAdd] eval "only" "fit"
bindkey ^[[NumpadHome] stuff "-"
bindkey ^[[NumpadEnd] stuff "+"
bindkey ^[[NumpadIns] stuff "conf t\012"
bindkey ^[[NumpadDel] stuff "end\012"
bindkey ^[[Pause] suspend
bindkey ^[[PrintScreen] detach
bindkey ^? stuff ^h
bindkey "\033^M" command #
bindkey "\033`" command # alt-`
escape "" # no more ctrl-a to get to command mode
bindkey ^[^[[5~ eval "copy" "stuff \"^u\"" # alt-page-up goes to copy mode
bindkey ^[^[[6~ eval "copy" # alt-page-down goes to copy mode
bindkey -m ^[^[[5~ stuff "^u" # alt-page-up sends page-up in copy mode
bindkey -m ^[^[[6~ stuff "^d" # alt-page-down sends page-down in copy mode
For historical reasons (Can't type properly and on original PCs had to use
the editing keys all the time. They were on the numpad only, so never used
'numlock'. New PCs come with separate editing keys, but already too used
to type numbers without keypad.), I don't use the keys on the numpad in my
normal work, so I have 17-keys to use for macros like this. Now, to scroll
with the mouse, I've just extended this to make ctrl-scrollwheel send the
same pseudo escape codes as pg-up/down do:
GroupAdd UNIX, ahk_class PuTTY
GroupAdd UNIX, ahk_class VNCviewer
GroupAdd UNIX, ahk_class cygwin/x
#IfwinActive ahk_group UNIX
|[Prev in Thread]
||[Next in Thread]|
- (no subject),
Pieter Luteijn <=