home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 7.6 KB | 175 lines | [TEXT/ttxt] |
- /*
-
- FunKey 1.1.1
-
- by Alex D. Chaffee
- chaffee@reed.uucp
- Compuserve: 71210,1117
- Reed College Box 259, Portland, OR 97202
-
- Copyright © 1990. All Rights Reserved. Permission is granted to
- distribute freely, as long as this document and copyright information
- remain intact and are distributed along with the program.
-
- Portions Copyright © 1989 Symantec Corporation. Thanks to Michael Kahl et
- al. for THINK C.
-
- Also thanks to Paul Mercer, Darin Adler, Paul Snively, and Ken McLeod for
- ShowInit, Jason "We don't need no stinking patches" Klivington, and Steve
- Riggins and all the CompuServe/Usenet gurus for invaluable support and
- assistance.
-
- Introduction:
-
- FunKey is a replacement for Carlos Weber's old (but excellent) Pop-Keys
- INIT. Like Pop-Keys, it allows you to pull up a popup menu from which
- you can select any installed FKEYs. Like Pop-Keys, the menu can be
- selected by moving to a part of the screen. Also, when you hold down
- the familiar Command and Shift keys, FunKey changes the pointer to its
- own "F" cursor. The menu pops up when you click the mouse button. FunKey
- also overcomes some bugs and shortcomings of Pop-Keys.
-
- Installation:
-
- FunKey is a standard INIT, complete with startup icon. To install it,
- simply drag it into the system folder and reboot. If you hold down
- the mouse button during startup, FunKey will not install.
-
- Usage:
-
- Like the man said - hold down Command and Shift at any point after
- startup, and you will see the Funky Cursor. You can then select a
- function key the normal way - by pressing a number from zero to nine -
- or the Funky way - by holding down the mouse button. A menu will
- appear, containing the names and ID#s of all FKEYs in the system
- folder, installed with Suitcase or the like, and in any open files.
- Selecting an FKEY from the menu will activate it, just as if you had
- pressed the associated key. The FKEYs which are installed on the
- keyboard are denoted by command-key equivalents (although pressing
- these keys while the menu is up won't do anything). FKEYs with no
- name are named "Untitled."
-
- In the "About Box" is a checkbox allowing you to select whether or
- not you'd like to see the ID numbers in the menu. Untitled FKEYs will
- always show their numbers, so that you can tell them apart. (It's
- not a bug...) The About Box also has a set of self-explanatory radio
- buttons entitled "Sort by Name" and "Sort by Number." If you change
- any of these settings, FunKey will try to remember them by creating
- a file called "FunKey Prefs" in your System Folder. Actually, it
- will put it in a folder called "Preferences", creating said folder if
- it's not already there. These names are in STR resource #128, if
- you'd like to change them.
-
- (The use of a Preferences folder to reduce system folder clutter is
- supported by several other programs, and it's relatively easy to fix
- some INITs to use it as well. Look in the INIT's resource fork with
- ResEdit for a STR or STR# whose contents are the name of the
- preferences file. Add ":Preferences:" to the beginning of this string.
- For example, Boomerang 2.0's STR -4048 resource reads, "Boomerang
- Prefs". Change this to ":Preferences:Boomerang Prefs", move your
- Boomerang Prefs file into the Preferences folder, and reboot. If
- it crashes, you can always change it back...)
-
- As of version 0.4, there will be a 1 second delay between the time
- you press command-shift and the time the cursor shows up. You can
- still click the mouse during the lag time.
-
- As of version 1.1 (enough of this 0.x nonsense), you can define a
- "hot rect" in which Funkey will act as though the cmd and shift keys
- are pressed. To disable the hot rect, set it to (0,0,0,0).
-
- Known Bugs and Limitations:
-
- • FunKey doesn't work quite right under MultiFinder: if you click above
- a window that's not in the current layer, the menu will work all
- right, but before it comes up or after it goes away, MultiFinder will
- *sometimes* switch layers. (Note that normally, the mouse clicks are
- invisible to the current application -- but keystrokes are revceived
- by the application, to accomodate the Cmd-Shift menu items of
- some applications.)
-
- Sometimes, immediately after switching layers in the above fashion, an
- item in the menu will appear as a dotted line. Selecting this line
- will do nothing but beep. The complete menu will return the next time.
-
- • If you have a lot of FKEYs installed, it may take a second or two
- for the menu to come up after you click the mouse. As of version 0.2,
- FunKey only rebuilds its internal list whenever it has to, so the
- first pause should be the longest. There may be a way to make it
- faster, but it may be more trouble than it's worth... If you find that
- it's unusable at its present speed, let me know and I'll be more
- motivated to fix it.
-
- Wish List:
-
- • Allow for user-configurable "hot" keys (other than Command-Shift)
- • FKEY mover features, like Renumber, Rename, and Open File
- • "Where Is" function - to show the file a given FKEY is from
- • ...Suggestions?
-
- Technical Info:
-
- FunKey patches the low-memory global jGNEFilter to install its own
- GetNextEvent filtering routine. This routine checks GetKeys to set the
- cursor, then if the event is a mouseDown, pops the menu. FunKey also
- patches SetCursor and InitCursor so that the Funky Cursor isn't changed
- while Command and Shift are down. To find out when it has to rebuild its
- list, it first checks to see if the resource map looks different, then
- checks all its handles to make sure they're valid. Thus if you load or
- unload a new FKEY file with Suitcase or Juggler, or switch layers into
- an application with its own FKEYs, then the next time you use FunKey it'll
- rebuild its list.
-
- A Request:
-
- I am not asking for any remuneration for FunKey, other than the
- following: if you like it, if you find a bug, if you have any
- suggestions or gripes, or if you want to say "Hi," please let me know.
- I'm not in this for the money (at least not yet), only for the
- satisfaction of knowing that my (enjoyable) efforts have also been
- enjoyed by others.
-
- Version History:
-
- 10/89 Prototype written
- 1/8/90 After finals and break, version 0.1 is ready to roll
- 1/28/90 Version 0.2
- • It's now a bit quicker - it only rebuilds its internal FKEY
- list when something has changed. (The remaining delay is
- for the menu itself to be built.) When it's doing this it
- shows the watch cursor.
- • It builds the list right after startup too. This time it
- shows the Funky cursor.
- • You can no longer use FunKey from within its own About Box.
- (Which means you'd better not do an exit-to-shell from the
- About Box -- FunKey will never turn itself back on!)
- • Now uses a slightly optimized quicksort algorithm for a few
- precious ticks of speed.
- • Preferences in About Box and Funky Prefs file (see above).
- • "Funky Down" sound (courtesy of James Brown)
-
- 2/4/90 Version 0.3
- • About Box / prefs file crash fixed
- • Removed hooks for sound (sorry, James!)
- • Cooler About Box
-
- 5/16/90 Version 0.4
- • Compatible with Kiss INIT
- • Now creates a Preferences folder if one doesn't exist
- • Never accidentally uses someone else's menu instead
- • Sets cursor to arrow when a normal cmd-shift-key is pressed
- Note: this doesn't work in DAs.
- • Added Cursor Delay (1 sec.) so screen dump FKEYs work (FKEYs
- get called by the system before FunKey gets a chance to turn
- its cursor off). You can still click up the menu even though
- the cursor isn't showing.
- • Added some error alerts (esp. "Not enough memory to load
- FKEY.")
-
- 3/5/91 Version 1.1
- • Hot Rect added
- 3/6/91 Version 1.1.1
- • Added xNIT icon
- • Made sure version is always correct
- */
-