Atari ST series Technical Reference Manual page 194

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

Read/Change Keyboard Shift Status
Kbshift()
T h is f u n c t i o n r e t u r n s i n f o r m a t i o n a b o u t t h e s t a t u s o f t h e s p e c ia l s h if t k e y s ,
i n c l u d i n g C o n t r o l a n d A l t e r n a t e . I t c a n a l s o b e u s e d to c h a n g e t h e s h if t
s t a t u s .
C macro format
in t s h i f t c o d e , m o d e ;
s h i f t c o d e =
K b s h i f t ( m o d e ) ;
Machine language format
m o v e . w
# m o d e , - ( s p )
m o v e . w
# 1 1 , - ( s p )
tr a p
# 1 3
a d d q .l
# 4 , s p
Inputs
m o d e
w o r d
Results
DO
s h i f t c o d e
l o n g
N o t e t h a t s i n c e k e y s r e a d w i t h B c o n i n ( ) a r e b u f f e r e d , t h e s h if t s t a t u s
a t t h e t i m e K b s h i f t ( ) is c a lle d is n o t n e c e s s a r i l y t h e s a m e a s w h e n t h e l a s t
c h a r a c t e r w a s r e a d w i t h B c o n i n ( ) . T h e b it a s s i g n m e n t s a r e :
Bit Number
Bit Value
0
1
1
2
2
4
3
8
4
1 6
5
3 2
6
6 4
7
1 2 8
See also
B c o n i n ( )
186
Kbshift
Mode
is a f la g t h a t i n d i c a t e s w h e t h e r y o u
w i s h t o r e a d o r s e t t h e s h if t s t a t u s . A
n e g a t i v e v a l u e in m o d e r e q u e s t s a s t a t u s
r e a d . A p o s i t i v e v a l u e c a u s e s t h e f u n c t i o n
to s e t t h e s t a t u s c o d e to t h e v a l u e in d i­
c a t e d , a f t e r r e a d i n g t h e c u r r e n t c o d e
v a l u e .
A b i t f la g t h a t i n d i c a t e s w h i c h o f t h e s h if t k e y s a r e
c u r r e n t l y p r e s s e d . A b it t h a t 's s e t t o 1 i n d i c a t e s
t h a t t h e k e y w a s p r e s s e d w h e n t h e c a ll w a s m a d e .
Shift Key
R i g h t s h if t k e y
L e f t s h if t k e y
C o n t r o l k e y
A l t e r n a t e k e y
C a p s lo c k o n
A l t e r n a t e - C l r / H o m e k e y c o m b i n a t i o n ( k e y b o a r d
e q u i v a l e n t f o r r i g h t m o u s e b u t t o n )
A H e r n a t e - I n s e r t k e y c o m b i n a t i o n (k e y b o a r d
e q u i v a l e n t f o r le f t m o u s e b u t t o n )
R e s e r v e d ( c u r r e n t l y 0 )
Opcode = 11

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents