## HoeKey Quick and dirty:

HoeKey lets you assign most keys on your keyboard to many different actions. You set this up in a config file.
To get started, run HoeKey, push Win-Q, click Edit Config.
This file is formatted like:
Key=Function|Option1|Option2|Option3|Option4|Option5 ; Description
Key can be any/all of:
~ = Windows key
_ = Shift key
^ = Control key
@ = Alt key
And then a keyboard key, like W (~W = windows-w, ^_G = ctrl-shift-g), or a special/multimedia key, like F1 or Pause
Function can be one of the following:
Create new window: Run, RunDialog, MsgBox, Input, Apps
Existing window: Move, MoveRel, Center, AlwaysOnTop, Hide, Unhide, UnhideAll, Show, Editify, Kill
Do stuff: Keys, Volume, Wait, Eject, RunAlias
Nerdy programmer: Msg, FocusMsg
HoeKey: Config, TrayIcon, HotKeys, Reload, Rem
There are also Special commands, Aliases multimedia messages.

### Create new window:

- Run|Program Name|State|Wait|StartIn

- Run a program.
  %s will be replaced with current selection.
  %S will be replaced with current selection (encoded for use in running URL's)
  %c will be replaced with current directory, %d with current drive
  %i = hoekey ini file
  %t = current window title, %l = current window class
  %u = results of last Input function
  %u = results of last Input function (encoded for use in running URL's)
  %f = current date
  %g = current time (no seconds)
  %h = current time (seconds)
  %% for a %
  \r = carriage return (do \r\n in msgbox for a newline)
  \n = newline
  \t = tab
  \\ for a \
  Also environment strings will be expanded, e.g. %temp%, %path%, %os%
  State can be 0 to start app normal, 2 to start minimized, 3 to start maximized
  Wait can be 1 to wait for exit before continuing (stacked commands)
  Wait can be 2 to reactive previous run program
  StartIn is the directory to start in, % stuff applies here too

      ~K=Run|calc.exe
      ~N=Run|notepad.exe|3 ; start notepad maximized

- RunDialog|StartIn

- Display Windows "Run" Dialog
  StartIn is the directory to start in, % stuff applies here too

      _^R=RunDialog
      _^R=RunDialog|c:\

- MsgBox|Text|Title|Timeout

- Display message on screen
  Note that the same %s,%c,%d,%i,%t,%l,%u stuff from the Run command applies

      Startup=MsgBox|HoeKey loaded (ya hoe)

- Input|Text|Title|Timeout|Default

- Get quick user input
  The results of the user input goes into the variable %u, for later usage by Run, or MsgBox, or whatever.
  Note that the same %s,%c,%d,%i,%t,%l,%u stuff from the Run command applies

      ; Do a quick Google I'm Feeling Lucky search based on input:
      ~I=Input|Google search:|Moz tacular||%u
      =Run|"C:\good\MozillaFirebird\MozillaFirebird.exe" "http://www.google.com/search?q=%u&btnI=I'm+Feeling+Lucky"

      ; Show Google results, based on last input:
      ~_I=Run|"C:\good\MozillaFirebird\MozillaFirebird.exe" "http://www.google.com/search?q=%u"         ; google lucky

- Apps|0=Hidden, 1=All

- Show list of apps hidden by HoeKey, or all windows
  Double click to show window.

      ~F4=Apps ; show apps hidden by hoekey Hide command
      ~_F4=Apps|1 ; show all apps

### Existing window:

- Move|WindowClass|left|top|width|height

- Move current or selected window.
  Negative left moves window relative to right side of screen, etc.
  Negative width resizes relative to screen.

      ~_V=Move||512|1|512|700 ; Move current window to right side of 1024x768 screen
      ~8=Move                 ; Center current window

- MoveRel|WindowClass|left|top|width|height

- Move current or selected window relatively.

      ~^V=MoveRel||50 ; Move current window right 50 pixels
      ~^8=MoveRel||||50|-50 ; Make current window 50 pixels wider and 50 pixels shorter

- Center|WindowClass|NoWidthOrNoHeight

- Center current or selected window.

      ~^V=Center ; center current window vertically and horizontally
      ~^8=Center||1 ; center current window only vertically
      ~^9=Center||2 ; center current window only horizontally

- AlwaysOnTop|WindowClass

- Set app to always be on top
  Empty WindowClass for current window

      ~8=AlwaysOnTop

- Transparency|WindowClass|Level (0-100)

- Toggle transparency of window where 10 is 10% visible
  Empty WindowClass for current window, empty level for 70% transparency

      ~4=Transparency ; make current window 70% visible
      ~4=Transparency|Notepad|30 ; make notepad 30% visible (mostly transparent)

- Hide|WindowClass|1=HideToTray,2=HideFromEverything

- Hide current or specified application, add to hidden stack. Optionally show in systray. 2=Do not add application to stack (stays hidden even after quitting HoeKey)

      ~35=Hide

- Unhide|WindowClass

- Show the last application hidden (from hidden stack)

      ~36=Unhide

- UnhideAll

- Show all applications that were hidden by HoeKey

      ~H=UnhideAll

- Show|WindowClass

- Show specified application

      ~S=Show|Winamp v1.x

- Editify

- Show text from current window in a way that you can copy to clipboard

      ~Y=Editify

- Kill|WindowClass

- Kill current or specified application

      ~K=Kill

### Do stuff:

- Keys|Keystrokes|Delay

- Playback keystrokes. Optional Delay in milliseconds
  \s:shift down
  \S:shift up
  \c:control down
  \C:control up
  \a:alt down
  \A:alt up
  \w:win down
  \W:win up
  \z:right mouse button/context menu
  \n:return
  \t:tab
  \l:left
  \k:right
  \u:up
  \d:down
  \h:home
  \e:end
  \i:insert
  \x:delete
  \b:backspace
  \p:escape
  %s will be replaced with current selection.
  %c will be replaced with current directory, %d with current drive
  %i = hoekey ini file
  %t = current window title, %l = current window class
  %u = results of last Input function
  %f = current date
  %g = current time (no seconds)
  %h = current time (seconds)
  %% for a %
  Also environment strings will be expanded, e.g. %temp%, %path%, %os%

      ^~K=Keys|\x\d\h\h

- Volume|Volume (0-100)

- Set master volume to absolute value, 0-100%

      _~7=Volume||70

- Wait|Milliseconds

- wait (for stacking commands)

      ~W=Run|c:\program files\Winamp\winamp.exe
      =Wait|1000 ; wait a second
      =Msg|Winamp v1.x|273|40045 ; play

- Eject|Drive|Toggle=0, Open=1, Close=2

- Eject/Close cd-drive. note it toggles open/close based on best known status which is not reliable

      ~J=Eject	; eject first CD drive
      ~K=Eject|f: ; eject f: drive

- RunAlias|Alias

- Run a previously defined alias
  To use aliases, first define them:

      *Screensaver_Start=Msg|0|274|61760	; start screensaver
      *np=Run|Notepad.exe					; run notepad

  Next, either use them directly in your config file:

      ~N=np
      ~f3=Screensaver_Start

  Or, you can choose from them by typing into an inputbox:

      ~T=Input|Enter alias to run:|||%u
      =RunAlias|%u

### Nerdy programmer:

- Msg|WindowClass|Message|wParam|lParam
  - Send message to application
    Empty WindowClass for current window

        ~C=Msg|Winamp v1.x|273|40046 ; pause winamp
        ~33=Msg||274|61488 ; pgup = maximize current window
        ~34=Msg||274|61472 ; pgdn = minimize current window

- FocusMsg|WindowClass|Message|wParam|lParam

- Focus application, then send message to it

      ~A=FocusMsg|Winamp v1.x|273|40188 ; about current winamp song
      ~W=FocusMsg|Winamp v1.x ; set focus to winamp

### HoeKey:

- Config

- Bring up HoeKey configure screen

      ~Q=Config

- TrayIcon|Enable=1, Disable=0|Text

- Show icon in system tray for HoeKey. Double click to configure.
  Text is optional tooltip for the icon.

      Start=TrayIcon|1|je suis un canard gigantesque

- HotKeys|Enable=1, Disable=0

- Enable or disable hotkeys

      ; Disable hotkeys, run notepad, re-enable hotkeys
      ~9=HotKeys|0
      =Run|notepad.exe||1
      =HotKeys|1

- Reload|File|Append=1

- Reload HoeKey config file

      ~R=Reload				; reload current config
      ~R=Reload|gaming.ini	; load different config
      ~R=Reload|tv.ini|1		; add on other config

- Rem|Some Comment

- Remark / comment, the key is ignored

      ~F=Rem|Find Files		; Explorer binds this
      -=Rem|-- Winamp Functions -- ; Describe a section

### Special commands:

There are some config options, anywhere in your .ini file:

- Config=Function|Option...

- Do action when Config button is clicked in HoeKey

      Config=Run|hoekeyconfig.exe %i

- Start=Function|Option...

- Do action when line is read during startup (not stackable, just put multiple)

      Start=MsgBox|HoeKey Started sir!

- Load=Function|Option...

- Do action every time config is loaded (not stackable, just put multiple)

      Load=MsgBox|Config loaded.

### Special Keys:

Backspace Tab Enter Esc Space Page Up Page Down End Home Left Up Right Down Insert Delete | Num 0 Num 1 Num 2 Num 3 Num 4 Num 5 Num 6 Num 7 Num 8 Num 9 Num / Num * Num + Num - Num Del | F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 | Num Lock Application Right Windows Left Windows Caps Lock

You can get a more detailed listing of keys here. (use the second column of numbers)

### Multi-media keyboard keys:

These are the funny keys along the top of some keyboards. Hoekey only supports these in WindowsXP (but try anyway and tell me if I'm wrong!)

    179=Msg|Winamp v1.x|273|40046 ; pause winamp

Key | Code to use in HoeKey
BROWSER_BACK | 166
BROWSER_FORWARD | 167
BROWSER_REFRESH | 168
BROWSER_STOP | 169
BROWSER_SEARCH | 170
BROWSER_FAVORITES | 171
BROWSER_HOME | 172
VOLUME_MUTE | 173
VOLUME_DOWN | 174
VOLUME_UP | 175
MEDIA_NEXT_TRACK | 176
MEDIA_PREV_TRACK | 177
MEDIA_STOP | 178
MEDIA_PLAY_PAUSE | 179
LAUNCH_MAIL | 180
LAUNCH_MEDIA_SELECT | 181
LAUNCH_APP1 | 182
LAUNCH_APP2 | 183

### Media Messages:

Send these messages to WMPlayerApp to control Windows Media Player, or Progman for general:

Function | lParam | Example
BROWSER_BACKWARD | 65536 |
BROWSER_FORWARD | 131072 |
BROWSER_REFRESH | 196608 |
BROWSER_STOP | 262144 |
BROWSER_SEARCH | 327680 |
BROWSER_FAVORITES | 393216 |
BROWSER_HOME | 458752 |
VOLUME_MUTE | 524288 |
VOLUME_DOWN | 589824 |
VOLUME_UP | 655360 |
MEDIA_NEXTTRACK | 720896 |
MEDIA_PREVIOUSTRACK | 786432 |
MEDIA_STOP | 851968 | ~x=Msg|WMPlayerApp|793|0|851968 ; Stop WMP
MEDIA_PLAY_PAUSE | 917504 | ~c=Msg|WMPlayerApp|793|0|917504 ; Pause WMP
LAUNCH_MAIL | 983040 |
LAUNCH_MEDIA_SELECT | 1048576 |
LAUNCH_APP1 | 1114112 |
LAUNCH_APP2 | 1179648 |
BASS_DOWN | 1245184 |
BASS_BOOST | 1310720 |
BASS_UP | 1376256 |
TREBLE_DOWN | 1441792 |
TREBLE_UP | 1507328 |
MICROPHONE_VOLUME_MUTE | 1572864 |
MICROPHONE_VOLUME_DOWN | 1638400 |
MICROPHONE_VOLUME_UP | 1703936 |
HELP | 1769472 |
FIND | 1835008 |
NEW | 1900544 |
OPEN | 1966080 |
CLOSE | 2031616 |
SAVE | 2097152 |
PRINT | 2162688 |
UNDO | 2228224 |
REDO | 2293760 |
COPY | 2359296 |
CUT | 2424832 |
PASTE | 2490368 |
REPLY_TO_MAIL | 2555904 |
FORWARD_MAIL | 2621440 |
SEND_MAIL | 2686976 |
SPELL_CHECK | 2752512 |
DICTATE_OR_COMMAND_CONTROL_TOGGLE | 2818048 |
MIC_ON_OFF_TOGGLE | 2883584 |
CORRECTION_LIST | 2949120 |
MEDIA_PLAY | 3014656 |
MEDIA_PAUSE | 3080192 |
MEDIA_RECORD | 3145728 |
MEDIA_FAST_FORWARD | 3211264 | ~v=Msg|WMPlayerApp|793|0|3211264 ; Fast Forward WMP
MEDIA_REWIND | 3276800 | ~z=Msg|WMPlayerApp|793|0|3276800 ; Rewind WMP
MEDIA_CHANNEL_UP | 3342336 |
MEDIA_CHANNEL_DOWN | 3407872 |

comments ? tim

### history:

- 1.13: Jan 5, 2005
  - Add aliasing, see ConfigExamples and the help file for more information
  - Show special key names (option in system menu of config window)
  - Change versioning convention. 1.13 is the newest
- a12b8: Nov 15, 2004
  - Change cursor right in key send to \k instead of \r
  - Simplify example config
  - Add ConfigExamples.ini file
- a12b7: Sep 8, 2004
  - Remove \r \n \t from run and rundialog - this was causing confusion with paths
  - newest upx and nsis
  - move to http://apps.bcheck.net/
- a12b6: Jun 16, 2004
  - Fix up the installer
  - Add \r \n \t to msgbox, run, etc. e.g. ~d=msgbox|Hi\r\nThere!
  - Fix strange input/messagebox behavior (not showing quoted strings, accented characters, etc)
  - %U and %S are url-encoded counterparts of %u and %s for URL runs, e.g. ~d=Run|http://www.google.com/search?q=%S
- a12b4: Apr 07, 2004
  - About box in keys screen sysmenu
  - unhide multiple selections in the Apps dialog
- a12b3: Mar 30, 2004
  - Keys command can use all the same stuff as run/msgbox, e.g. %c for current directory.
  - %f = current date, %g = current time (no seconds), %h = current time (with seconds)
- a12b2: Mar 04, 2004
  - Use hoekey.ini file from same directory as hoekey.exe rather than the "Start-in" directory
  - Remember Config and Apps dialog sizes (saves to hksettings.ini file)
- a12b1: Mar 03, 2004
  - Close applist on double click app
  - Option to permanently hide windows (not add to stack) (specify 2 for ToTray parameter)
  - Disable/enable hotkeys does not get disabled
  - Disable test ui for config
- a12b0: Dec 11, 2003 (test only)
  - Test of ui for config (no add or remove, and default config disables)
  - Expand environment strings (%path%, etc), for run, msgbox, etc etc
- a11b13: Oct 29, 2003
  - Add context menu to sendkeys (\z)
- a11b12: Sep 23, 2003
  - Reduce apparent memory usage for hidden apps
  - Unhide apps to previous state
  - On failed function, do not continue stacked hoekey (run, input, etc)
- a11b11: Sep 21, 2003
  - fix problem with UnhideAll command
  - Add HideTomTray option to hide function: hide||1 = hide to tray, double click icon or unhide hotkey to show again
  - setforegroundwindow after unhideapp
  - fix %c/%d doc mixup
  - add small wait after input/msgbox for stacking
- a11b10: Sep 14, 2003
  - Add working directory parm to RunDialog
- a11b9: Sep 3, 2003
  - Alt-key hotkeys for keys command doesn't eat first key (jdn)
  - Hold down modifiers and do several hotkeys without releasing modifiers (jdn)
  - Fix compatibility with early releases of Win95
  - Cleanup .ini file
  - Update config dialog for Reload command (jdn)
  - Restore focus after config/apps dialog (jdn)
  - "\-" = space in Keys command (for leading or trailing) (jdn)
  - Stack/Unstack/Cycle commands (see config, seeing if any interest) (jdn)
  - Fix Unhide crasher introduced in a11b8
- a11b8: Aug 24, 2003
  - add Apps function, shows list of windows hidden by hoekey, or all windows (milan)
  - Hide/Unhide specific windows
- a11b7: Aug 23, 2003
  - add Input function, input is %u in anything stringable (amorpheus)
  - make MsgBox text selectable
- a11b6: Aug 6, 2003
  - Rem function (milan)
  - ??? (mystery features)
  - eject cd (Amorpheus)
  - reduce taskmgr's shown mem usage
- a11b5: Jul 22, 2003
  - add include option to reload command
  - if run hoekey.exe with different config while hoekey already running, can append to current config
  - move width/height not working (bbarker)
  - show nice names for keys, can use nice names in config file too (ohl)
- a11b4: Jun 27, 2003
  - add timed msgbox
  - fix crashers showing config (stacked commands)
  - fix config to edit reloaded config
  - reload in stack causes problems, don't do it :)
- a11b3: Jun 24, 2003
  - change Reload to accept ini file name, e.g. ~114=Reload|c:\hoekey\other.ini
- a11b2: Jun 5, 2003
  - add escape and windows keys to keys function
  - add Windows and Escape keys to Keys command
  - if windowclass=0, then gets desktopwindow
  - add runonce parm to Run command - reactivates prev run app (wait=2)
  - fix Show command to setforeground
  - clean up versioning
- a10: May 28, 2003
  - Add Move function, =Move|class|left|top|width|height negative numbers move relative to lower right of screen
  - Add MoveRel function to move window relatively, =Move|class|left|top|width|height where left,top etc can be negative
  - Add Center function = Center|class|1or2 where 1=don't center width, 2=don't center height
  - Add Kill function (scarey!)
  - Add HotKeys function: =enable||1 ; to enable =enable||0 ; to disable hotkeys
  - Add TrayIcon function to enable HoeKey trayicon and set tooltip, double click for config
  - Add Config command, like config=Run|hoekeyconfig.exe %i
  - !Changed startup commands to Start= rather than 1= - note they dont stack, just put multiple
  - In Run function: %i=hoekey ini file, %t=current window title, %l=current window class
  - %s,%d,%c,%i,%t,%l work in msgbox as well as run
  - Add wait parm to Run function: e.g. Run|notepad.exe %i||1 (run notepad and wait until exit)
  - Add per keystroke delay to Keys : =Keys|blahblah|100 ; 100 msec delay between keystrokes
  - Can now use explorer's hotkeys by "Start=Kill|progman" at top and "Start=Run|explorer.exe" at bottom
  - Add to default config: win shift e to open explorer in current dir (scarey!)
  - Cleaned example config file
  - Tried making this help file more clear
  - Add installer as alternative to zip download
  - Add "start in directory" to Run function
  - Can specify hoekey ini file on command line, eg HoeKey.exe c:\blah\timskeys.ini
  - Can run hoekey function and exit, eg HoeKey.exe -XMsgBox|Hi there!!
- a9: May 22, 2003
  - In Run function: %c = curdir, %d = curdrive of top window (maybe not all versions of explorer)
  - Fix longer key codes
  - Fix mod keys getting re-hit (start menu pops up after long Keys command)
- a8: April 11, 2003
  - Fixed stacked commands - specify with blank key
  - Resizable config window
  - Close HoeKey if error loading keyfile
  - Add Show function
  - Focus application with focusmsg function
  - Add suspend / hibernate command to default config file
  - Show comments as descriptions for key commands
  - Make run dialog box show up in lower left corner
  - Specify max/min/normal window for run command: ~N=Run|notepad.exe|3 - 0/1=norm,2=min,3=max
- a7: March 29, 2003
  - Add RunDialog function
  - Add AlwaysOnTop function
  - Add Transparency function (win2k, xp)
  - Send message to current window ( minimize/maximize/restore in config )
  - Don't eat all the %'s in urls
- a6: May 28, 2002: fix Keys to send non alpha-numeric stuff.
- a5: April 3, 2002: allow 3 numbers. fix misc key mappings, e.g. tilde.
- a4: fix line numbers for errors. use 16x16 icon. change Quit to Config. fix Run when used with %s clipboard stuff (crashed!). deprecate quit and reload. Reduce size to 9k uncompressed, 7k compressed
- a3: released at bcheck.arsware.org