Difference between revisions of "OSBYTE &CA"

From BeebWiki
Jump to: navigation, search
m (1 revision)
(Tested and rewritten to clarify action.)
Line 1: Line 1:
 
[[Category:OSBYTE]]
 
[[Category:OSBYTE]]
OSBYTE &CA (202) - Read/Write Keyboard Status
+
===OSBYTE &CA (202) - Read/Write Keyboard Status===
  
    This byte determines the current state of the LOCK keys
+
  This byte determines the current state of the keyboard modifier keys
     b0=reserved
+
     b0 = BBC/Electron: reserved             RISC OS: Alt pressed
     b1=reserved
+
     b1 = BBC/Electron: reserved             RISC OS: Scroll Lock set
     b2=reserved
+
     b2 = BBC/Electron: reserved             RISC OS: Num Lock set
     b3=0=shift not pressed
+
     b3 = Shift pressed
     b4=0=caps lock on
+
     b4 = Caps lock off
     b5=0=shift lock on
+
     b5 = Shift lock off
     b6=0=control not pressed
+
        (ie, b5-4=01: Shift Lock on, 10: Caps Lock on, 11: No lock)
     b7=0=shift enable
+
     b6 = Electron: FN pressed            BBC/RISC OS: Control pressed
    Note With caps lock on and shift enable off, shift has no effect on the
+
     b7 = Shift enable (Shift Caps or Shift Inverse)
        letters.
+
 
    (Electron OS)
+
  With Caps Lock on and Shift Enable off, Shift has no effect on letter keys.
    b4=0=caps lock on
+
 
    b5=0=FN key not pressed
+
===Examples===
    b6=0=shift not pressed
+
* *'''FX 202,16''' turns Shift Lock on
    b7=0=control not pressed
+
* *'''FX 202,32''' turns Caps Lock on
    (RISC OS 1.00)
+
* *'''FX 202,48''' turns Caps Lock/Shift Lock off
    b1=0=scroll lock off
+
* *'''FX 202,160''' turns Shift Caps on
    b2=0=num lock on
 
    b5=reserved
 
  
==See Also==
 
* http://mdfs.net/Docs/Comp/BBC/OsbyteA6
 
  
 
[[User:Jgharston|Jgharston]] 22:48, 26 May 2009 (UTC)
 
[[User:Jgharston|Jgharston]] 22:48, 26 May 2009 (UTC)
 +
[[User:Jgharston|Jgharston]] ([[User talk:Jgharston|talk]]) 20:18, 13 June 2016 (UTC)

Revision as of 21:18, 13 June 2016

OSBYTE &CA (202) - Read/Write Keyboard Status

 This byte determines the current state of the keyboard modifier keys
   b0 = BBC/Electron: reserved              RISC OS: Alt pressed
   b1 = BBC/Electron: reserved              RISC OS: Scroll Lock set
   b2 = BBC/Electron: reserved              RISC OS: Num Lock set
   b3 = Shift pressed
   b4 = Caps lock off
   b5 = Shift lock off
       (ie, b5-4=01: Shift Lock on, 10: Caps Lock on, 11: No lock)
   b6 = Electron: FN pressed            BBC/RISC OS: Control pressed
   b7 = Shift enable (Shift Caps or Shift Inverse)
 
 With Caps Lock on and Shift Enable off, Shift has no effect on letter keys.

Examples

  • *FX 202,16 turns Shift Lock on
  • *FX 202,32 turns Caps Lock on
  • *FX 202,48 turns Caps Lock/Shift Lock off
  • *FX 202,160 turns Shift Caps on


Jgharston 22:48, 26 May 2009 (UTC) Jgharston (talk) 20:18, 13 June 2016 (UTC)