Subversion Repositories Kolibri OS

Rev

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

Rev 3357 Rev 3669
Line 1... Line 1...
1
diff16 'tp-key.asm',0,$
1
diff16 'tp-key.asm',0,$
Line 2... Line 2...
2
 
2
 
3
key:
3
key:
4
	mov	ecx,1
4
        mov     ecx,1
5
	mcall	66,3
5
        mcall   66,3            ; Get status of the control keys
6
	mov	[shi],eax
6
        mov     [shi],eax
7
	xor	ebx,ebx
7
        xor     ebx,ebx
8
	test	al,0x03
8
        test    al,0x03         ; Left or right shift
9
	jz	@f
9
        jz      @f
10
	or	ebx,KM_SHIFT
10
        or      ebx,KM_SHIFT
11
    @@: test	al,0x0C
11
    @@: test    al,0x0C         ; Left or right control
12
	jz	@f
12
        jz      @f
13
	or	ebx,KM_CTRL
13
        or      ebx,KM_CTRL
14
    @@: test	al,0x30
14
    @@: test    al,0x10         ; Left alt
15
	jz	@f
15
        jz      @f
16
	or	ebx,KM_ALT
16
        or      ebx,KM_ALT
17
    @@: mov	edx,ebx
17
    @@: mov     edx,ebx
18
	test	al,0x03
18
        test    al,0x03
Line 80... Line 80...
80
	cmp	ecx,2
80
        cmp     ecx,2
81
	jnz	.no_caps_lock
81
        jnz     .no_caps_lock
82
	dec	ecx
82
        dec     ecx
83
.no_caps_lock:
83
.no_caps_lock:
84
;--------------------------------------
84
;--------------------------------------
-
 
85
; alt gr pressed?
-
 
86
        test    [shi], 0x00000020
-
 
87
        jz      .no_alt_gr
-
 
88
        mov     ecx, 3
-
 
89
  .no_alt_gr:
-
 
90
;--------------------------------------
85
	push	eax
91
        push    eax
86
	mcall	26,2,,key1
92
        mcall   26,2,,key1
87
	pop	eax
93
        pop     eax
Line 88... Line 94...
88
 
94