Subversion Repositories Kolibri OS

Rev

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

Rev 2987 Rev 3500
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;;
4
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa      ;;
4
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa      ;;
5
;; Distributed under terms of the GNU General Public License    ;;
5
;; Distributed under terms of the GNU General Public License    ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 2987 $
8
$Revision: 3500 $
9
 
9
 
10
 
10
 
Line 15... Line 15...
15
VKEY_LALT     = 0000000000010000b
15
VKEY_LALT     = 0000000000010000b
16
VKEY_RALT     = 0000000000100000b
16
VKEY_RALT     = 0000000000100000b
17
VKEY_CAPSLOCK = 0000000001000000b
17
VKEY_CAPSLOCK = 0000000001000000b
18
VKEY_NUMLOCK  = 0000000010000000b
18
VKEY_NUMLOCK  = 0000000010000000b
19
VKEY_SCRLOCK  = 0000000100000000b
19
VKEY_SCRLOCK  = 0000000100000000b
-
 
20
VKEY_LWIN     = 0000001000000000b
-
 
21
VKEY_RWIN     = 0000010000000000b
Line 20... Line 22...
20
 
22
 
21
VKEY_SHIFT    = 0000000000000011b
23
VKEY_SHIFT    = 0000000000000011b
22
VKEY_CONTROL  = 0000000000001100b
24
VKEY_CONTROL  = 0000000000001100b
Line 222... Line 224...
222
.normal_code:
224
.normal_code:
223
        mov     cl, 0
225
        mov     cl, 0
224
        xchg    cl, [ext_code]
226
        xchg    cl, [ext_code]
225
        and     al, 0x7F
227
        and     al, 0x7F
226
        mov     bh, 1
228
        mov     bh, 1
-
 
229
;--------------------------------------
-
 
230
@@:
-
 
231
        cmp     al, 0x5B
-
 
232
        jne     @f
-
 
233
        
-
 
234
        cmp     cl, 0xE0
-
 
235
        jne     @f
-
 
236
        
-
 
237
        mov     eax, VKEY_LWIN
-
 
238
        mov     bh, 0
-
 
239
        jmp     .modifier
-
 
240
;--------------------------------------
-
 
241
@@:
-
 
242
        cmp     al, 0x5C
-
 
243
        jne     @f
-
 
244
        
-
 
245
        cmp     cl, 0xE0
-
 
246
        jne     @f
-
 
247
        
-
 
248
        mov     eax, VKEY_RWIN
-
 
249
        mov     bh, 0
-
 
250
        jmp     .modifier
-
 
251
;--------------------------------------
227
@@:
252
@@:
228
        cmp     al, 0x2A
253
        cmp     al, 0x2A
229
        jne     @f
254
        jne     @f
Line 230... Line 255...
230
        
255
        
Line 357... Line 382...
357
        test    ch, ch
382
        test    ch, ch
358
        js      .writekey
383
        js      .writekey
Line 359... Line 384...
359
        
384
        
360
        xor     [kb_state], eax
385
        xor     [kb_state], eax
361
        xor     [kb_lights], bl
-
 
362
        push    ecx
-
 
363
        call    set_lights
-
 
364
        pop     ecx
386
        xor     [kb_lights], bl
365
.writekey:
387
.writekey:
366
        pushad
388
        pushad
367
; test for system hotkeys
389
; test for system hotkeys
368
        movzx   eax, ch
390
        movzx   eax, ch
Line 493... Line 515...
493
        call    mutex_unlock
515
        call    mutex_unlock
494
        pop     esi ebx
516
        pop     esi ebx
495
        ret
517
        ret
Line 496... Line 518...
496
 
518
 
-
 
519
ps2_set_lights:
497
ps2_set_lights:
520
        stdcall disable_irq, 1
498
        mov     al, 0xED
521
        mov     al, 0xED
499
        call    kb_write
522
        call    kb_write
500
        mov     al, [esp+8]
523
        mov     al, [esp+8]
-
 
524
        call    kb_write
501
        call    kb_write
525
        stdcall enable_irq, 1
Line 502... Line 526...
502
        ret     8
526
        ret     8
503
 
527
 
504
;// mike.dld ]
528
;// mike.dld ]