Subversion Repositories Kolibri OS

Rev

Rev 8866 | Rev 9715 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8866 Rev 8892
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2021. 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: 8866 $
8
$Revision: 8892 $
9
 
9
 
10
 
10
 
11
VKEY_LSHIFT   = 0000000000000001b
11
VKEY_LSHIFT   = 00000000_00000001b
12
VKEY_RSHIFT   = 0000000000000010b
12
VKEY_RSHIFT   = 00000000_00000010b
13
VKEY_LCONTROL = 0000000000000100b
13
VKEY_LCONTROL = 00000000_00000100b
14
VKEY_RCONTROL = 0000000000001000b
14
VKEY_RCONTROL = 00000000_00001000b
15
VKEY_LALT     = 0000000000010000b
15
VKEY_LALT     = 00000000_00010000b
16
VKEY_RALT     = 0000000000100000b
16
VKEY_RALT     = 00000000_00100000b
17
VKEY_CAPSLOCK = 0000000001000000b
17
VKEY_CAPSLOCK = 00000000_01000000b
18
VKEY_NUMLOCK  = 0000000010000000b
18
VKEY_NUMLOCK  = 00000000_10000000b
19
VKEY_SCRLOCK  = 0000000100000000b
19
VKEY_SCRLOCK  = 00000001_00000000b
20
VKEY_LWIN     = 0000001000000000b
20
VKEY_LWIN     = 00000010_00000000b
21
VKEY_RWIN     = 0000010000000000b
21
VKEY_RWIN     = 00000100_00000000b
22
 
22
 
Line 23... Line 23...
23
VKEY_SHIFT    = 0000000000000011b
23
VKEY_SHIFT    = VKEY_LSHIFT + VKEY_RSHIFT
24
VKEY_CONTROL  = 0000000000001100b
24
VKEY_CONTROL  = VKEY_LCONTROL + VKEY_RCONTROL
25
VKEY_ALT      = 0000000000110000b
25
VKEY_ALT      = VKEY_LALT + VKEY_RALT
26
 
26
 
Line 194... Line 194...
194
;---------------------------------------------------------------------
194
;---------------------------------------------------------------------
195
align 4
195
align 4
196
irq1:
196
irq1:
197
        movzx   eax, word[thread_count]; top window process
197
        movzx   eax, word[thread_count]; top window process
198
        movzx   eax, word[WIN_POS+eax*2]
198
        movzx   eax, word[WIN_POS+eax*2]
199
        shl     eax, 8
199
        shl     eax, BSF sizeof.APPDATA
200
        mov     al, [SLOT_BASE+eax+APPDATA.keyboard_mode]
200
        mov     al, [SLOT_BASE+eax+APPDATA.keyboard_mode]
201
        mov     [keyboard_mode], al
201
        mov     [keyboard_mode], al
Line 202... Line 202...
202
        
202
        
203
        in      al, 0x60
203
        in      al, 0x60
Line 508... Line 508...
508
        cmp     al, 120
508
        cmp     al, 120
509
        jae     .exit.irq1
509
        jae     .exit.irq1
510
        inc     eax
510
        inc     eax
511
        mov     [KEY_COUNT], al
511
        mov     [KEY_COUNT], al
512
; store ascii or scancode
512
; store ascii or scancode
513
        mov     [KEY_COUNT+eax], bl ; actually KEY_BUFF + EAX - 1
513
        mov     [KEY_BUFF+eax-1], bl
514
; store original scancode
514
; store original scancode
515
        add     eax, 120+2
515
        add     eax, 120+2
516
        push    ecx
516
        push    ecx
517
        cmp     [keyboard_mode], 0; return from keymap
517
        cmp     [keyboard_mode], 0; return from keymap
518
        je      @f
518
        je      @f
Line 519... Line 519...
519
 
519
 
520
        xor     ch, ch
520
        xor     ch, ch
521
@@:
521
@@:
522
        mov     [KEY_COUNT+eax], ch ; actually KEY_BUFF + EAX - 1
522
        mov     [KEY_BUFF+eax-1], ch
523
        pop     ecx
523
        pop     ecx
524
        sub     eax, 120+2
524
        sub     eax, 120+2
525
.exit.irq1:
525
.exit.irq1:
526
        ret
526
        ret
Line 570... Line 570...
570
        mov     [old_kb_lights], al
570
        mov     [old_kb_lights], al
571
        call    set_lights
571
        call    set_lights
572
.nothing:
572
.nothing:
573
        ret
573
        ret
574
;---------------------------------------------------------------------
574
;---------------------------------------------------------------------
575
numlock_map:
575
iglobal
576
    db   0x37   ;Num 7
-
 
577
    db   0x38   ;Num 8
-
 
578
    db   0x39   ;Num 9
-
 
579
    db   0x2D   ;Num -
-
 
580
    db   0x34   ;Num 4
576
numlock_map db '789-456+1230.'
581
    db   0x35   ;Num 5
-
 
582
    db   0x36   ;Num 6
-
 
583
    db   0x2B   ;Num +
-
 
584
    db   0x31   ;Num 1
-
 
585
    db   0x32   ;Num 2
-
 
586
    db   0x33   ;Num 3
-
 
587
    db   0x30   ;Num 0
-
 
588
    db   0x2E   ;Num .
577
endg
589
;---------------------------------------------------------------------
578
;---------------------------------------------------------------------