home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
532.lha
/
PWKeys_v2.0
/
PWkeys2.0.doc.pp
/
PWkeys2.0.doc
Wrap
Text File
|
1991-07-10
|
12KB
|
325 lines
//
\\ // PWkeys V2.0
\//
1991
by
Preben Nielsen
WHATS NEW
Version 1.0/1.1 trashed low memory (oops). This version doesn't.
Many functions and features have been added.
WHAT IS PWKEYS ?
PWkeys is an input-handler that allows you to manipulate windows and
screens by pressing keys on the keyboard. It also gives you screen and
mouse blanking, a sunmouse (automatic activation of windows when the
mouse moves into them), mouse acceleration and the opportunity to lock
the mouse and the keyboard so no-one can use it but you.
HOW TO START PWKEYS
From CLI : Type 'PWkeys' and press RETURN.
There is NO need to use 'RUN', 'RUNBACK', 'ARUN' etc.
PWkeys terminates immediately leaving only the handler
in memory (only 2456 bytes).
To use other key-bindings than the default type:
'PWkeys filename' where 'filename' is the name of
a file created by the program SetPWkeys.
From Workbench: Double-click on the PWkeys icon.
To use other key-bindings than the default you
can do two thing:
1.
a. Single-click on the PWkeys icon (its a Tool Icon)
b. Select 'Info' from the 'Project' menu
c. In the 'Tool Types' field write 'FILE=filename'
where 'filename' is the name of a file created
by the program SetPWkeys.
2.
a. Create a Project icon
b. Single-click on the the icon
c. Select 'Info' from the 'Project' menu
d. In the 'Tool Types' field write 'FILE=filename'
where 'filename' is the name of a file created
by the program SetPWkeys.
e. In the 'Default Tool' field write the pathname
of PWkeys program (e.g. 'SYS:utilties/PWkeys' if
PWkeys is in the utilities drawer on SYS:
HOW TO END PWKEYS
To remove PWkeys simply
1. double-click its icon again
or
2. type 'PWkeys' RETURN in a CLI.
WHAT CAN PWKEYS DO ?
PWkeys lets you perform 25 functions on windows, screens etc.
These functions are:
Move-Window-To-Top-Of-Screen: Moves the active window to the
top of the screen.
Move-Window-To-Bottom-Of-Screen: Moves the active window to the
bottom of the screen.
Move-Window-To-Left-Side-Of-Screen: Moves the active window to the
left side of the screen.
Move-Window-To-Right-Side-Of-Screen: Moves the active window to the
right side of the screen.
Place-Window-In-Upper-Left-Corner-Of-Screen:
Places the active window to the
upper left corner of the screen.
Place-Window-In-Lower-Left-Corner-Of-Screen:
Places the active window to the
lower left corner of the screen.
Place-Window-In-Upper-Right-Corner-Of-Screen:
Places the active window to the
upper right corner of the screen.
Place-Window-In-Lower-Right-Corner-Of-Screen:
Places the active window to the
lower left corner of the screen.
Place-Window-In-Center-Of-Screen: Places the active window in the
center of the screen.
Move-Window-To-Front: Moves the active window in front
of all others on the screen>
Move_Window-To-Back: Moves the active window behind all
others on the screen.
Move-Backmost-Window-To-Front: Moves the backmost window to the
front and activates it.
Move-Frontmost-Window-To-Back: Moves the frontmost window to the
back and activates the new frontmost
window.
Activate-Previous-Window: Activates the window behind the
currently-active one.
Activate-Next-Window: Activates the window above the
currently-active one.
Minimize-Window: Minimizes the active window IF
it has a SIZING-gadget.
Maximize-Window: Maximizes the active window IF
it has a SIZING-gadget.
Refresh-Window: Refreshes the frame and all
gadgets in the active window.
Move-Backmost-Screen-To-Front: Moves the backmost screen to the
front and activates it's topmost
window.
Move-Frontmost-Screen-To-Back: Moves the frontmost screen to the
back and activates the topmost window
on the new frontmost screen.
Subtract-Bitplane-From-Screen: Subtracts a bitplane from the active
screen. It won't touch HAM-screens,
and EHB-screens won't be EHB-screens
after this. You should be careful with
this function. Using it on a screen
belonging to a program which draws
directly into the bitplanes is a fast
way to recieve a visit from a certain
man from India (The Guru !!).
Add-Bitplane-To-Screen: Adds a bitplane to the active screen
if there is enough CHIP-memory.
HIRES-screens can get a maximum of 4
bitplanes. LORES-screens can get a
maximum of 6 bitplanes (6 bitplanes by
forcing the screen into EHB mode).
Toggle-Input-Lock: This functions toggles between the
normal state of the machine, and a
state where the screen blanks and
mouse and keyboard goes dead. This
is useful when you have to leave
your Amiga turned on (while ray-
tracing ?) but don't want anyone (not
even your cat) to take advantage of
your absence. The only way to get
back to normal is to reset the Amiga
(a bit drastic ?) or once more press
the key-combination that activates this
function (don't tell your cat which
key-combination).
Toggle-Fast-Mouse: This function turns the acceleration
of mouse-movements on/off. The speed
and sensitivity can be specified using
the program SetPWkeys.
Toggle-Sun-Mouse: This function turns the Sun-mouse
on/off. That the sunmouse is turned
on means that windows activate when
you move the mouse into them. You
don't have to click the mouse in the
window to activate them.
NOTE: Mouse acceleration and sunmouse is disabled while you are pressing
any of the mouse buttons.
By default PWkeys binds the functions to the following hotkeys:
LSHIFT-LAMIGA-KP1 : Place-Window-In-Upper-Left-Corner-Of-Screen
LSHIFT-LAMIGA-KP2 : Move-Window-To-Bottom-Of-Screen
LSHIFT-LAMIGA-KP3 : Place-Window-In-Lower-Right-Corner-Of-Screen
LSHIFT-LAMIGA-KP4 : Move-Window-To-Left-Side-Of-Screen
LSHIFT-LAMIGA-KP5 : Place-Window-In-Center-Of-Screen
LSHIFT-LAMIGA-KP6 : Move-Window-To-Right-Side-Of-Screen
LSHIFT-LAMIGA-KP7 : Place-Window-In-Upper-Left-Corner-Of-Screen
LSHIFT-LAMIGA-KP8 : Move-Window-To-Top-Of-Screen
LSHIFT-LAMIGA-KP9 : Place-Window-In-Upper-Right-Corner-Of-Screen
LSHIFT LAMIGA-LEFTARROW : Activate-Previous-Window
LSHIFT LAMIGE-RIGHTARROW: Activate-Next-Window
LSHIFT-LAMIGA-DOWNARROW : Move-Window-To-Front
LSHIFT-LAMIGA-UPARROW : Move-Window-To-Back
LSHIFT-LAMIGA-TAB : Refresh-Window
LSHIFT-LAMIGA-F1 : Minimize-Window
LSHIFT-LAMIGA-F2 : Maximize-Window
LAMIGA-DOWNARROW : Move-Backmost-Window-To-Front
LAMIGA-UPARROW : Move-Frontmost-Window-To-Back
RSHIFT-RAMIGA-DOWNARROW : Move-Backmost-Screen-To-Front
RSHIFT-RAMIGA-UPARROW : Move-Frontmost-Screen-To-Back
RSHIFT-RAMIGA-F9 : Subtract-Bitplane-From-Screen
RSHIFT-RAMIGA-F10 : Add-Bitplane-To-Screen
LAMIGA-RAMIGA-BACKSPACE : Toggle-Input-Lock
LAMIGA-RAMIGA-DEL : Toggle-Fast-Mouse
LAMIGA-RAMIGA-HELP : Toggle-Sun-Mouse
where
LAMIGA means the left Amiga/Command key
RAMIGA means the right Amiga/Command key
LSHIFT means the left 'SHIFT' key
RSHIFT means the right 'SHIFT' key
HELP means the 'HELP' key
DEL means the 'DEL' key
BACKSPACE means the '<-' backspace key
TAB means the '->|' tabulator key
KP1 means '1' on the numeric keyboard
KP2 means '2' on the numeric keyboard
KP3 means '3' on the numeric keyboard
KP4 means '4' on the numeric keyboard
KP5 means '5' on the numeric keyboard
KP6 means '6' on the numeric keyboard
KP7 means '7' on the numeric keyboard
KP8 means '8' on the numeric keyboard
KP9 means '9' on the numeric keyboard
F1 means the 'F1' key
F2 means the 'F2' key
F9 means the 'F9' key
F10 means the 'F10' key
UPARROW means the arrow-up key
DOWNARROW means the arrow-down key
RIGHTARROW means the arrow-right key
LEFTARROW means the arrow-left key
To overwrite the default bindings above, use the program SetPWkeys
which will let you bind each of the 25 function to any key-combination
you may prefer.
Besides the functions mentioned above which can all be activated by
hotkeys, PWkeys also gives you mouse and screen blanking. Mouse blanking
means that the mouse-pointer disappears if you haven't used it for a while.
the mouse-pointer re-appears as soon as you move or click the mouse. Screen
blanking means that the monitor goes black if you haven't used the mouse or
the keyboard for a certain period of time. This is done to prevent burning
the picture into the monitor. To break screen blanking, you only have to
move the mouse or press any key on the keyboard (the event won't be lost).
The program SetPWkeys allows you to specify the time PWkeys should wait
before blanking.
WHY DOESN'T IT SOMETIMES WORK ?
1. Intuition will not let you manipulate screens and windows in
any way if the active window has an active gadget in it (especially
string-gadgets), so in these cases PWkeys won't try to do anything.
2. PWkeys won't try to MOVE backdrop-windows
HOW DOES PWKEYS WORK ?
PWkeys works by installing an input-handler at priority 51 (default).
The fact that PWkeys does a lot of Intuition-calls from the input.device's
task might seem risky, but because I don't try to call Intuition while
gadgets are active, I haven't experienced any lock-ups. I therefore don't
see any need to run PWkeys as an indepentent task, but if anyone has
experienced any problems then let me know.
PWkeys uses persistent blanking; if the screen or mouse blanking is
being broken by Intuition or some other program (by calls to SetPointer,
OpenScreen etc.), then PWkeys will blank again as soon as it finds out.
NOTE ON BLANKING: Screen-blanking is not done by opening a black screen.
Instead I temporarely replace the active views copper-
list with a copper list that ensures a black display,
then I turn of the raster-DMA and restore the original
copper-list. This method has the advantage that doesn't
de-active the active window and doesn't use any extra
memory. Mouse-blanking is done by assigning an invisible
image to sprite 0, and not by turning of the sprite-DMA.
FUTURE FEATURES:
» More functions.
» The ability to bind a function to more than one key-definition. This
would allow something like SHIFT-UPARROW (i.e. the ability to activate
a function by pressing either LSHIFT-UPARROW or RSHIFT-UPARROW). It is
actually not PWkeys fault that this is not currently possible. SetPWkeys
is to blame for this.
CREDITS:
Davide P. Cervone for his wKeys from Fisk-disk 128.
Matt Dillon for DMouse which showed me how to implement mouse-blanking
and a SunMouse.
=====================================================================
Send bug-reports, suggestions, comments etc. to:
///
/// Preben Nielsen
\\\ /// Oehlenschlægersgade 72 st. T.V.
\\\/// 1663 Copenhagen V.
\/// Denmark
I would also like to hear from you if you actually use PWkeys/SetPWkeys.