| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | [TSEPro] Re: Replacement for: binary [`getshift.bin`]? (Re: Message |
From: "Sammy Mitchell"
@Date: Wed, 12 Feb 2003 20:10:03 -0500
@Sender: semware-owner{at}sawasdi.apana.org.au
Jan A. Nauta wrote:
>But the crux of the problem still exists: to discriminate
>between shifted (hot)keybindings and not-shifted
>(hot)keybindings. I have made three examples to state my
>case: example1 is my current TSE1.00 configuration,
>examples 2 and 3 are experiments to translate that
>configuration to the new TSE4.00 software.
Note that this change was implemented in TSE v2, way back in
1994. So, it has been the this way for a long time, not
just with v4.
There may be another way, but this is all I could come up
with:
In your WhenLoaded, do the following:
Hook(_AFTER_GETKEY_, afterGetKey)
Somewhere before the WhenLoaded, include the following
procedure:
proc afterGetKey()
integer the_key = Query(Key)
if HiByte(the_key) & _KEY_SHIFT_
Set(Key,
((HiByte(the_key) & ~ _KEY_SHIFT_) shl 8)
| LoByte(the_key))
endif
end
Now, use the following for ShiftKeyPressed()
integer proc ShiftKeyPressed()
return (GetKeyFlags() & _SHIFT_KEY_)
end
!!!_note_!!!! _KEY_SHIFT_ and _SHIFT_KEY_ are two different
values. Use _SHIFT_KEY_ with GetKeyFlags(), and _KEY_SHIFT_
with Query(key). I need a review board to keep bad things
like this from happening!
Here is a simple macro to test this, to make sure it is
working for you. Press for instance, f8, then shift-f8.
Note that it doesn't change normal ASCII keys such as 'a'
and 'A'.
-----cut here-----------------------------------------------
proc afterGetKey()
integer the_key = Query(Key)
if HiByte(the_key) & _KEY_SHIFT_
Set(Key,
((HiByte(the_key) & ~ _KEY_SHIFT_) shl 8)
| LoByte(the_key))
endif
end
proc main()
integer key, flags
Hook(_AFTER_GETKEY_, afterGetKey)
Set(Attr, Color(Bright Yellow on Blue))
PopWinOpen(1, 1, 80, 25, 1, "", Color(Yellow on Blue))
ClrScr()
GotoXY(1, 1)
repeat
key = GetKey()
flags = GetKeyFlags()
WriteLine(key:4:'0':16;
flags:4:'0':16;
KeyName(key);
iif(flags & _SHIFT_KEY_, "(shift pressed)", ""))
until key ==
PopWinClose()
Unhook(afterGetKey)
end
-----cut here-----------------------------------------------
Anyway, this should give you the v1.0 key mapping behavior,
hopefully.
>TSE but to the OS - Win2K for example. So I have to use the
>Windows version of TSE). Therefore it would be useful to
>know how I can set the map switch of the SAL compiler to
>default to TRUE when compiling an .s file.
There isn't a way. You just have to use the -m switch when
you want a map file.
--
Sammy Mitchell
--
TSEPro mailing list
---
[sawasdi.apana.org.au] (3:800/846.13)
* Origin: apana>>>>>fidonetSEEN-BY: 633/267 270 @PATH: 800/846 1 640/954 774/605 123/500 106/1 379/1 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.