multikeys 3.0
November 12th, 2001
- an advanced hotkeys module for LiteStep/PureLS
Written by qwilk (qwilk@desktopian.org)
description
multikeys is an advanced hotkeys module for LiteStep/PureLS. Its features include hotkey groups (you can have multiple functions assigned to the same hotkey depending on the currently selected group!), displaying of commands and errors, popup menus listing all available groups, hotkeys and commands, extensive configuration options with !Refresh support, and much more! It also supports the key configuration syntaxes of jugg's jKey and the standard LS hotkey module for true plug'n'play compatibility.
general information
I have included a sample configuration file (multikeys.rc, which can be #include'd into your step.rc), a background bitmap and an error sound (.wav) to get you going. I recommend trying this "demo" setup first to give you a hint of what is possible when using multikeys.

Since multikeys 3.0 makes use of some fairly new functionality in LSAPI you will need a LiteStep build dated February 6th, 2001 or later to get the most out of it. As for PureLS, you need a build dated March 27th, 2001 or later. [Please note that most features will still work fine with earlier releases]

And finally, quoting MrJukes: Have fun!

Today is yesterday's tomorrow.

qwilk

revision history
multikeys 3.0 (2001-11-12) / qwilk
  • Added support for jKey and standard LS Hotkey syntax! (you can disable this by using mkNoLoadjKeys and mkNoLoadHotkeys, respectively)
  • Changed the name of the module to multikeys to reflect its support for multiple groups, multiple syntaxes, and multiple shells (LS/PureLS)
  • All bangs now begin with "!mk", all step.rc settings with "mk", and key definitions with "*mkey" (should be easier to remember <vbg>)
  • Default group is now set to "Default" if not defined, unless jKeys/Hotkeys are present, then "jKey"/"Hotkey" will be used instead (jKey has precedence if you use both...)
  • Added !mkPlayWav <.wav> (only 10 more lines of code - one less module to load!)
  • Added missing key: PrtScn
  • Fixed: Error color would sometimes be used for successful commands when toggling the window from hidden to shown
  • Fixed: Settings can now be in any file (PureLS fix, thanks jugg for the tip!)
  • Changed group switching bang (again...) to "!mkGroup <group>" (the logical choice)
  • New documentation (HTML)
  • Cleaned up the source code
  • jukeys 2.0q (2001-02-07) / qwilk

  • Added jukeysOffsetX <offset>, jukeysOffsetY <offset> (works the same way as in LSXCommand)
  • Added jukeysGroupShow, jukeysGroupX <offset>, jukeysGroupY <offset>
  • Removed jukeysNoTitle (replaced by the new Group commands)
  • Added jukeysCommandShow, jukeysCommandX <offset>, jukeysCommandY <offset>
  • Added jukeysCommandColor <color>, jukeysErrorColor <color>
  • Added jukeysMsgErrorCmd <message>, jukeysMsgErrorBang <message>
  • Added jukeysErrorSound <path\to\.wav>
  • Added jukeysMouseLeft <n>, jukeysMouseRight <n>, jukeysMouseMiddle <n>
  • Added a new "select group" popup menu for easy group switching
  • Added !jukeysPopup, !jukeysPopupGroups
  • Added !jukeysRepeat
  • Added !jukeysMove, !jukeysMove <x> <y>
  • Added !jukeysSetCommand <command> <args> and !jukeysSetError <message> as an interface to the "world outside" (other modules)... =)
  • Added missing key: Escape
  • Now repositions automatically on screen resolution change
  • Change: "!jkSwitchTo" is now "!jukeysSwitchTo" - just like all the other bangs
  • Change: A background bitmap now has precedence over background colour, like in all other LiteStep modules...
  • Fixed: Everything (?) is updated on !Refresh now
  • Fixed: Multi-modifier hotkeys wasn't displayed correctly in the popup menu
  • Fixed: jukeysFontFace wasn't working
  • Fixed: Switching to a non-existing group was possible
  • Fixed: Bang scripting (!execute [command1][command2]... ) now works
  • Included a background bitmap, an error sound and a jukeys.rc configuration file
  • Cleaned up the code, added more comments (source to be released soon!)
  • jukeys 1.1q (2001-01-22) / qwilk

  • Added jukeysNoTitle (-> current group name not displayed)
  • Added missing keys: Pause, Insert, Delete, Home, End, PageUp, PageDown, Tab, Backspace, Spacebar, Apps, Enter, Mul, Div, Add, Sub, Dec, Num0-Num9
  • !Refresh support (only hotkey definitions are refreshed for now)
  • Compiled with latest LSAPI; now uses LSExecuteEx instead
  • jukeys 1.0 (2000-09-26) / MrJukes

  • Original release
  • future releases?
  • Support for the extra keys on extended keyboards
  • Make multikeys window draggable, or...
  • LsBox support?
  • [your wish goes here - send me your ideas! :D ]
  • initial setup

    How to load the module (example using an e-variable):
    ThemeDir $LitestepDir$themes\MyTheme\
    LoadModule "$ThemeDir$modules\multikeys\multikeys.dll"

    step.rc settings

    "Reference from" offset (same as the one used by LSXCommand):
    0 -> Left/Top (default), 1 -> Horizontal/Vertical Center, 2 -> Bottom/Right

    mkOffsetX 1
    mkOffsetY 2

    mkX 0    x position relative to offset (see above), supports negative values
    mkY -24    y position relative to offset (see above), supports negative values
    mkW 400    width
    mkH 24    height

    mkStartHidden    duh!
    mkAlwaysOnTop    ...

    mkBackBmp multikeys.bmp    background bitmap, has precedence over...
    mkBackColor 091F35    background color
    If neither mkBackBmp nor mkBackColor is set, the multikeys window will be hidden automatically

    mkFontFace "Tahoma"    font (used for group name, command, error display)
    mkFontSize 13    font size (...)
    mkFontColor 336699    font color for the group name display
    mkCommandColor 114477    font color for the command display
    mkErrorColor 5588BB    font color for the error display

    mkDefaultGroup Default
    Default group, set by multikeys at startup. "Default" is used if not defined, unless jKeys/Hotkeys are present, then "jKey"/"Hotkey" will be used instead

    mkGroupShow    display group name in the multikeys window
    mkGroupX 7    group name display x offset inside window
    mkGroupY 4    group name display y offset inside window
    mkCommandShow    for command and error display, same as for group name display
    mkCommandX 61    ...
    mkCommandY 4    ...

    mkMsgErrorCmd "Error: Command failed"    command error message
    mkMsgErrorBang "Error: !Bang failed"    !bang error message
    mkErrorSound "$ThemeDir$sounds\error.wav"    .wav file to play on command/!bang error

    Mouse click settings:
    0 = "hotkeys list" popup, 1 = "select group" popup,
    2 = repeat last command, 3 = switch to default group

    mkMouseLeft 1
    mkMouseRight 0
    mkMouseMiddle 3

    mkNoLoadjKeys    disable loading of *jKey configuration lines
    mkNoLoadHotkeys    disable loading of *Hotkey configuration lines

    key definition

    *mkey Group Modifier(s) Key command arguments

    Group = The name of the group you want the hotkey to part of. If multiple words "use quotes".
    There is a global group named "All" that is always active, no matter what the current group is.
    Reserved groups: "jKey" and "Hotkey" (used by multikeys)

    Modifier(s) = Win, Ctrl, Shift, Alt
    Combinations can also be used -> Win+Ctrl, Win+Alt etc.
    (Please note that the unlikely modifier Win+Ctrl+Alt+Shift is reserved for internal use...)

    Key = A-Z, 0-9, F1-F12, Left (Arrow), Right (Arrow), Up (Arrow), Down (Arrow), PrtScn, Pause, Insert, Delete, Home, End, PageUp, PageDown, Tab, Backspace, Spacebar, Enter, Mul, Div, Add, Sub, Dec, Num0-Num9, Apps (Application key, the one next to Right Win Key), Escape

    command = .exe or !bang command you want executed
    arguments = ...

    ---------------- Key definition examples -------------------
    *mkey All Win F12 !Shutdown
    *mkey Default Win S notepad $ThemeDir$step.rc
    *mkey Links Win+Ctrl Num0 !execute [http://desktopian.org/]

    !bang commands

    !mkShow    show the multikeys window
    !mkHide    hide the multikeys window
    !mkToggle    toggle the multikeys window shown/hidden
    !mkGroup groupname    makes "groupname" the active group
    !mkPopup    popup the "hotkeys list" menu at mouse pointer
    !mkPopupGroups    popup the "select group" menu at the mouse pointer
    !mkRepeat    repeat the last command
    !mkMove    moves the multikeys window back to the position defined in step.rc
    !mkMove x y    moves the multikeys window to position x,y
    !mkPlayWav file.wav    plays "file.wav" using synchronous sound (-> lower risk of skipping)

    The following two !bangs are used to interface with the "world outside"... =)
    For example, other modules (or scripts) could use multikeys to display error messages,
    or put the commands they execute in multikeys' repeat buffer / command display!

    !mkSetCommand command args    sets the multikeys command buffer and command display text
    !mkSetError text    sets the multikeys error display text, clears the command buffer

    ----------------- !bang command examples -----------------
    !mkGroup Default
    !mkSetCommand !execute [!CommandMove 0 -100][!mkShow]
    !mkSetError No way, José!