bson@rice-chex.ai.mit.edu (Jan Brittenson) (11/20/90)
In article <1448@fs1.ee.ubc.ca> jthornto@fs1.ee.ubc.ca (THORNTON JOHAN A) writes: > This is my "Soft Keys" application. Plenty of thanks! This is something I've needed and planned to do myself. Why do you use integer key codes, [BLUE][NXT][BLUE][S] could have a binding different from [BLUE][NXT][S]? > I chose [blue] [NXT] as the hot key; it's not used for anything > anyways. Hmm... mine certainly does something... it moves to the beginning of the current menu, a function that I find quite useful. However, does [BLUE][LIBRARY] do anything? Personally, I never use the interactive stack, and have just picked the [UP] key for SOFT use. Here is an example of LBROWSER usage I have been meaning to post. It displays a list of CHIP games, and when the PLAY key is pressed, the game is run. After play, control is returned to LBROWSER, which redraws the list. It's very simple, it just displays a list of all variables with string values in the current directory, and when you pick one, it's evaluated and fed to the CHIP interpreter. I put them in {HOME GAMES} where I keep my games and such. It can be bound to a SOFT, say [SOFT][G] key as the program << PATH HOME GAMES GAMES EVAL >> which would, ath the stroke of [SOFT][G], display a list of games, and when done, restore the path. Two programs are necessary. GAMES lists the games, and PLAY plays a game. One slight problem, though, is that CHIP won't always run from within a program. That's why I didn't post this example. But after adding BLINKY, it does (for me). It's quite unlikely that it will screw anything up; CHIP will just return immediately. And, oh, turn the clock off. @GAMES: #91E8h Bytes: 83 \<< 2 TVARS { PLAY "" "" "" "" "" } PATH { HOME LBRW LBROWSE } EVAL \>> @PLAY: #8FC2h Bytes: 90 \<< \-> P \<< DUP # 18DBFh SYSEVAL 4 + PICK 2 OVER SIZE SUB OBJ\-> CHIP # 3A1FCh SYSEVAL P 1 \>> \>>
jthornto@fs1.ee.ubc.ca (THORNTON JOHAN A) (11/20/90)
Incidentally, bson@rice-chex.ai.mit.edu (Jan Brittenson) writes: >In article <1448@fs1.ee.ubc.ca> > jthornto@fs1.ee.ubc.ca (THORNTON JOHAN A) writes: > > > This is my "Soft Keys" application. > > Plenty of thanks! This is something I've needed and planned to do >myself. Why do you use integer key codes, [BLUE][NXT][BLUE][S] could >have a binding different from [BLUE][NXT][S]? The KEY command only returns the first key, whether it's an S or [blue]. But it *is* trivial to modify the code to tack on a decimal ending to the definitions. The move would even be upward compatible with an old KLIST. I'll post it in a few days. > > I chose [blue] [NXT] as the hot key; it's not used for anything > > anyways. > > Hmm... mine certainly does something... it moves to the beginning >of the current menu, a function that I find quite useful. Oops. I was to quick on the trigger. Indeed, [blue] [NXT] does that. Oh well, I'm stuck on it. Pick your own favourite. A good idea is to soft-define the same key to the original function that you user-defined the KEYS program to. That way, the original function is just one keypress away. ------- _/__/ ----------------------------------------------------- _| ___| E l e c t r i c a l | Johan Thornton, Esq. | | |_/ E n g i n E E r i n g |------------------------- |/| __| U n i v e r s i t y | jthornto@fs1.ee.ubc.ca |-| |/__ o f B r i t i s h |------------------------- | |_____| C o l u m b i a | This space for rent ---- |__|/_| ------------------------------------------------------
bson@rice-chex.ai.mit.edu (Jan Brittenson) (11/21/90)
In article <1450@fs1.ee.ubc.ca> jthornto@fs1.ee.ubc.ca (THORNTON JOHAN A) writes: > The KEY command only returns the first key, whether it's an S or > [blue]. But it *is* trivial to modify the code to tack on a decimal > ending to the definitions. The move would even be upward compatible > with an old KLIST. I'll post it in a few days. Why not use WAIT instead?