Subversion Repositories Kolibri OS

Rev

Rev 5702 | Rev 5760 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5702 Rev 5706
Line 82... Line 82...
82
#define SCAN_CODE_HOME  071
82
#define SCAN_CODE_HOME  071
83
#define SCAN_CODE_END   079
83
#define SCAN_CODE_END   079
84
#define SCAN_CODE_PGDN  081
84
#define SCAN_CODE_PGDN  081
85
#define SCAN_CODE_PGUP  073
85
#define SCAN_CODE_PGUP  073
Line -... Line 86...
-
 
86
 
-
 
87
 
-
 
88
inline fastcall word GetKey()  //+Gluk fix
-
 
89
{
-
 
90
		$push edx
-
 
91
GETKEY:
-
 
92
		$mov  eax,2
-
 
93
		$int  0x40
-
 
94
		$cmp eax,1
-
 
95
		$jne GETKEYI
-
 
96
		$mov ah,dh
-
 
97
		$jmp GETKEYII //jz?
-
 
98
GETKEYI:
-
 
99
		$mov dh,ah
-
 
100
		$jmp GETKEY
-
 
101
GETKEYII:
-
 
102
		$pop edx
-
 
103
		$shr eax,8
-
 
104
}
-
 
105
 
-
 
106
unsigned char key_ascii;
-
 
107
dword key_scancode, key_modifier;
-
 
108
int GetKeys()
-
 
109
{
-
 
110
	$mov  eax,2
-
 
111
	$int  0x40
-
 
112
	key_ascii = AH;
-
 
113
	$shr  eax,16
-
 
114
	key_scancode = AL;
-
 
115
	//get alt/shift/ctrl key status
-
 
116
	$mov eax,66
-
 
117
	$mov ebx,3
-
 
118
	$int 0x40
-
 
119
	key_modifier = EAX;
-
 
120
}
86
 
121
 
87
//allow event mask
122
//allow event mask
88
#define EVENT_MASK_REDRAW   000000001b
123
#define EVENT_MASK_REDRAW   000000001b
89
#define EVENT_MASK_KEYBOARD 000000010b
124
#define EVENT_MASK_KEYBOARD 000000010b
90
#define EVENT_MASK_BUTTONS  000000100b
125
#define EVENT_MASK_BUTTONS  000000100b
Line 139... Line 174...
139
{
174
{
140
	$mov eax,40
175
	$mov eax,40
141
	$int 0x40
176
	$int 0x40
142
}
177
}
Line 143... Line -...
143
 
-
 
144
inline fastcall ScancodesGeting(){
-
 
145
	$mov eax,66
-
 
146
	$mov ebx,1
-
 
147
	$mov ecx,1 //᪠­ª®¤ë
-
 
148
	$int 0x40
-
 
149
}
-
 
150
 
-
 
151
inline fastcall GetStatusKey(){
-
 
152
	$mov eax,66
-
 
153
	$mov ebx,3
-
 
154
	$int 0x40
-
 
155
}
-
 
156
 
-
 
157
inline fastcall word GetKey()  //+Gluk fix
-
 
158
{
-
 
159
		$push edx
-
 
160
GETKEY:
-
 
161
		$mov  eax,2
-
 
162
		$int  0x40
-
 
163
		$cmp eax,1
-
 
164
		$jne GETKEYI
-
 
165
		$mov ah,dh
-
 
166
		$jmp GETKEYII //jz?
-
 
167
GETKEYI:
-
 
168
		$mov dh,ah
-
 
169
		$jmp GETKEY
-
 
170
GETKEYII:
-
 
171
		$pop edx
-
 
172
		$shr eax,8
-
 
173
}
-
 
174
 
-
 
175
inline fastcall int GetFullKey()
-
 
176
{
-
 
177
	$mov  eax,2
-
 
178
	$int  0x40
-
 
179
}
-
 
Line 180... Line 178...
180
 
178
 
181
 
179
 
182
inline fastcall pause(EBX)
180
inline fastcall pause(EBX)
183
{
181
{