83Plus:Hooks:9BB8

From WikiTI
Revision as of 12:00, 14 August 2007 by AndyJ (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Synopsis

Name: Help Hook (has been incorrectly called the Mode hook)

Hook Pointer Block Address: 9BB8

Hook Enable BCALL: 504A

Hook Disable BCALL: 504D

Hook Call BCALL: (Unknown)

Hook Active Flag: 4, (iy + 36h)

This hook is primarily a Raw Key hook that is triggered in only some parts of the operating system. There seems to be no pattern or logic behind what is and isn't passed to this hook; if you find any pattern, please describe it to us!

Using the Hook

A tells us where in the OS the key was pressed, and B contains the keycode. You can't cancel the keypress through the flags you return (or at least in some situations), but I think returning with B being zero should be safe.

  • A = 00h: The key was pressed in the catalog. Note: The catalog enables Alpha lock by default, so if you're looking for up / down, you might also need to check for kalphaup / kalphadown.
  • A = 01h: The key in B was pressed when a menu is visible. For some odd reason, this event isn't fired if the key will simply display another menu; for example, if you're viewing the MATH menu, and you press the VARS key, you're not notified of that keypress at all. C contains the number of menu choices visible; this value cannot be higher than 7.
  • A = 02h: This event is fired in response to several events (listed below) related to the link menu. Note: The Var Send / Recieve menus pass events with A = 1 (they act as normal menu, despite the fact it's a context). So if you press down to go to All-, that's passed with A = 1.
    • It's fired after the user presses 2nd+Link, and the menu is drawn. B = 41h (klinkio, cxlinkio)
    • It's fired after the user has pressed enter to go to the variable selection menu (note: the enter is passed with A = 1) but before it's actually displayed. B represents what was selected:
      • All+, B = 10h (kselall)
      • All-, B = 11h (kunselall)
      • Prgm, List, B = 1Fh (kvsendtype)
      • Lists to TI82, B = 12h, (kltoti82)
      • Backup, B = 13h, (kbackup)
      • SendID, B = 1Bh, (ksendid)
      • SendOS, B = 1Ch, (ksendsw)
    • The user has selected "quit" on an ERROR:XMIT prompt. B = 15h (klnkquit) in this case. An A = 01h event is also triggered for the selection (since it's a menu.)
    • I haven't tested this, but it may occur in a duplicate variable menu with B = 17h (krename), 18h (koverw), 19h (komit)
    • A key was pressed where the user is selecting the files to send. Pressing right here will pass the key as A = 02h, but realize that the Link / Transmit menu is a standard menu, and things in A = 01h apply. Also, pressing left on the Link / Transmit menu (to get back to the select menu) will cause the left key to get passed with both A = 01h and A = 02h. 2nd+Quit isn't passed in this case.
    • The user selected the Transmit item. B = 16h (ktrans)
  • A = 03h: The key in B was pressed while the user is in a mode selection screen; this includes the Mode screen, 2nd+Format screen, and the options on the Table Setup screen. The OS also passes the keypress that opened the context, at least for the Mode, 2nd+Format. For some reason, it is also called when you enter one of the Stat editors (with B = 56h, cxinfstat). Note that it's called AFTER the context has been shown.
  • A = 04h: This message is triggered whenever a keypress occurs in one of several conditions.
    • The cursor was on the Plot indicators on the top of the Y= editor. Keys that open menus aren't passed.
    • On any keypress in the plot configuration screen, except when you're editing the Xlist or Ylist items.
    • Your entering the stat plot editor context, with B = 55h (cxstatplot).
  • A = 05h: An error menu has just been displayed. B appears to always be 3Eh in this case.
  • A = 06h: This is called whenever a key is pressed in a Memory Management / Del screen, the ones with the list of the files. 2nd+Quit isn't passed.

Comments

This hook has been referred to as the Mode hook, but the only app to use it (Catalog Help) has nothing to do with the Mode screen.