Customizing Mouse Buttons
Mouse buttons can be "remapped" in the same way as keys.
The command is:
SET MOUSE BUTTON number key-modifiers event definition
Thus, for a 2-button mouse, there are 2 x 8 x 3 = 48 distinct actions
that can be assigned, and 72 for a 3-button mouse.
- Is the mouse button number 1, or 2. Or 3 if your mouse has 3 buttons.
This denotes which button causes the event. Normally button 1 is the left
- Tells which, if any, keys are held down during the mouse event. The possibilities
are NONE, ALT, ALT-SHIFT, CTRL,
CTRL-ALT, CTRL-SHIFT, CTRL-ALT-SHIFT, and
- Specifies the type of mouse event. The possibilities are:
- Is the definition for this event.
The definition is just like a key definition: it can be a single character,
a character string, a Kverb, or any combination. Kermit 95 has
hundreds of Kverbs. The following Kverbs are
specifically mouse-oriented, but you can also assign other Kverbs to mouse
- Marks and copies text to the Clipboard.
- Marks and copies text to the Clipboard, discarding line terminators.
- Copies from the clipboard into the current Kermit 95 screen.
- Marks and copies text to the SET PRINTER device.
- Marks and copies text to the host.
- Marks and copies text to the host, discarding line terminators.
- Transmit arrow-key sequences to move terminal
cursor to mouse position.
- Send URL under mouse cursor to Web browser.
- SET MOUSE BUTTON 1 CTRL CLICK \KMOUSEURL
- This puts the "URL hot spot" function on Ctrl-Button 1 (this is the
- SET MOUSE BUTTON 3 SHIFT DOUBLE-CLICK \KPASTE
- Puts "paste from Clipboard" on Button 3 Shift-Double-Click.
In addition to the built-in mouse functions, you can write your own
Kermit macros for processing mouse events. Kermit 95 provides
three Kermit variables \v(mousecurx), \v(mousecury),
and \v(select) which can be used in a macro.
The following macro starts the browser on the result of a drag event:
define myurl run start \m(browser) \v(select), if terminal-macro connect
This can then be assigned to a mouse event with
SET MOUSE BUTTON Button 1 Alt Drag \kmyurl
The \v(mousecurx) and \v(mousecury) represent the position
of the mouse click or the end of the drag event. This can be used with
the \fscrnstr() function to read text from the screen at that
Use SHOW MOUSE to show the current mouse event assignments.
Click Back on your Browser's Toolbar to return.