Functions 66.6, 66.7 - control input from the keyboard for hotkeys
git-svn-id: svn://kolibrios.org@2709 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -425,6 +425,17 @@ term9:
|
||||
add eax, 16
|
||||
cmp eax, hotkey_list+256*16
|
||||
jb .loop
|
||||
; get process PID
|
||||
mov eax, esi
|
||||
shl eax, 5
|
||||
mov eax, [eax+CURRENT_TASK+TASKDATA.pid]
|
||||
; compare current lock input with process PID
|
||||
cmp eax, [PID_lock_input]
|
||||
jne @f
|
||||
|
||||
xor eax, eax
|
||||
mov [PID_lock_input], eax
|
||||
@@:
|
||||
; remove hotkeys in buffer
|
||||
mov eax, hotkey_buffer
|
||||
.loop2:
|
||||
|
@@ -3468,6 +3468,27 @@ IPC
|
||||
<20> <20><>㣮<EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||
<20><><EFBFBD> <20><>-<2D>०<EFBFBD><E0A5A6><EFBFBD><EFBFBD> <20>㤥<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㢥<><E3A2A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
|
||||
------------- <20><><EFBFBD><EFBFBD>㭪<EFBFBD><E3ADAA><EFBFBD> 6 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0AEA2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>. -------------
|
||||
<EFBFBD><EFBFBD>ࠬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
* eax = 66 - <20><><EFBFBD><EFBFBD><EFBFBD> <20>㭪樨
|
||||
* ebx = 6 - <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>㭪樨
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>祭<EFBFBD><E7A5AD>:
|
||||
* <20>㭪<EFBFBD><E3ADAA><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <20><><EFBFBD>祭<EFBFBD><E7A5AD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>砭<EFBFBD><EFBFBD>:
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>樨 <20><><EFBFBD><EFBFBD> <20><>१ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> MOUSEMUL
|
||||
|
||||
--------- <20><><EFBFBD><EFBFBD>㭪<EFBFBD><E3ADAA><EFBFBD> 7 - ࠧ<><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0AEA2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>. ----------------
|
||||
<EFBFBD><EFBFBD>ࠬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
* eax = 66 - <20><><EFBFBD><EFBFBD><EFBFBD> <20>㭪樨
|
||||
* ebx = 7 - <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>㭪樨
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>祭<EFBFBD><E7A5AD>:
|
||||
* <20>㭪<EFBFBD><E3ADAA><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <20><><EFBFBD>祭<EFBFBD><E7A5AD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>砭<EFBFBD><EFBFBD>:
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0AEA2><EFBFBD><EFBFBD> १<><E0A5A7><EFBFBD><EFBFBD><EFBFBD>⮢ <20>. 66.6
|
||||
* <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>樨 <20><><EFBFBD><EFBFBD> <20><>१ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> MOUSEMUL
|
||||
|
||||
======================================================================
|
||||
============ <20>㭪<EFBFBD><E3ADAA><EFBFBD> 67 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/ࠧ<><E0A0A7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>. ===========
|
||||
======================================================================
|
||||
|
@@ -3448,6 +3448,26 @@ Remarks:
|
||||
If other application has defined the same combination, it will
|
||||
still receive notices.
|
||||
|
||||
--------------- Subfunction 6 - block the normal input. --------------
|
||||
Parameters:
|
||||
* eax = 66 - function number
|
||||
* ebx = 6 - subfunction number
|
||||
Returned value:
|
||||
* function does not return value
|
||||
Remarks:
|
||||
* Blocking the normal keyboard input for installed hotkeys
|
||||
* To emulate a mouse via the keyboard, the application MOUSEMUL
|
||||
|
||||
------------ Subfunction 7 - unlock the normal input. ----------------
|
||||
Parameters:
|
||||
* eax = 66 - function number
|
||||
* ebx = 7 - subfunction number
|
||||
Returned value:
|
||||
* function does not return value
|
||||
Remarks:
|
||||
* Unlocking the results of the f. 66.6
|
||||
* To emulate a mouse via the keyboard, the application MOUSEMUL
|
||||
|
||||
======================================================================
|
||||
========= Function 67 - change position/sizes of the window. =========
|
||||
======================================================================
|
||||
|
@@ -416,9 +416,16 @@ send_scancode:
|
||||
mov [edi+4], ax
|
||||
mov eax, [kb_state]
|
||||
mov [edi+6], ax
|
||||
|
||||
cmp [PID_lock_input], dword 0
|
||||
je .nohotkey
|
||||
|
||||
popad
|
||||
jmp .exit.irq1
|
||||
;--------------------------------------
|
||||
.nohotkey:
|
||||
popad
|
||||
|
||||
cmp [keyboard_mode], 0; return from keymap
|
||||
jne .scancode
|
||||
|
||||
|
@@ -4617,17 +4617,17 @@ f66call:
|
||||
dd sys_process_def.1 ; 1 = set keyboard mode
|
||||
dd sys_process_def.2 ; 2 = get keyboard mode
|
||||
dd sys_process_def.3 ; 3 = get keyboard ctrl, alt, shift
|
||||
dd sys_process_def.4
|
||||
dd sys_process_def.5
|
||||
dd sys_process_def.4 ; 4 = set system-wide hotkey
|
||||
dd sys_process_def.5 ; 5 = delete installed hotkey
|
||||
dd sys_process_def.6 ; 6 = disable input, work only hotkeys
|
||||
dd sys_process_def.7 ; 7 = enable input, opposition to f.66.6
|
||||
endg
|
||||
|
||||
|
||||
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
align 4
|
||||
sys_process_def:
|
||||
dec ebx
|
||||
cmp ebx, 5
|
||||
jae .not_support ;if >=6 then or eax,-1
|
||||
cmp ebx, 7
|
||||
jae .not_support ;if >=8 then or eax,-1
|
||||
|
||||
mov edi, [CURRENT_TASK]
|
||||
jmp dword [f66call+ebx*4]
|
||||
@@ -4635,33 +4635,28 @@ sys_process_def:
|
||||
.not_support:
|
||||
or eax, -1
|
||||
ret
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
align 4
|
||||
.1:
|
||||
shl edi, 8
|
||||
mov [edi+SLOT_BASE + APPDATA.keyboard_mode], cl
|
||||
|
||||
ret
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
align 4
|
||||
.2: ; 2 = get keyboard mode
|
||||
shl edi, 8
|
||||
movzx eax, byte [SLOT_BASE+edi + APPDATA.keyboard_mode]
|
||||
mov [esp+32], eax
|
||||
ret
|
||||
; xor eax,eax
|
||||
; movzx eax,byte [shift]
|
||||
; movzx ebx,byte [ctrl]
|
||||
; shl ebx,2
|
||||
; add eax,ebx
|
||||
; movzx ebx,byte [alt]
|
||||
; shl ebx,3
|
||||
; add eax,ebx
|
||||
;-----------------------------------------------------------------------------
|
||||
align 4
|
||||
.3: ;3 = get keyboard ctrl, alt, shift
|
||||
;// mike.dld [
|
||||
mov eax, [kb_state]
|
||||
;// mike.dld ]
|
||||
mov [esp+32], eax
|
||||
ret
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
align 4
|
||||
.4:
|
||||
mov eax, hotkey_list
|
||||
@@:
|
||||
@@ -4686,7 +4681,8 @@ sys_process_def:
|
||||
@@:
|
||||
and dword [esp+32], 0
|
||||
ret
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
align 4
|
||||
.5:
|
||||
movzx ebx, cl
|
||||
lea ebx, [hotkey_scancodes+ebx*4]
|
||||
@@ -4720,8 +4716,45 @@ sys_process_def:
|
||||
mov [eax], edx
|
||||
mov [esp+32], edx
|
||||
ret
|
||||
;-----------------------------------------------------------------------------
|
||||
align 4
|
||||
.6:
|
||||
pushfd
|
||||
cli
|
||||
mov eax, [PID_lock_input]
|
||||
test eax, eax
|
||||
jnz @f
|
||||
; get current PID
|
||||
mov eax, [CURRENT_TASK]
|
||||
shl eax, 5
|
||||
mov eax, [eax+CURRENT_TASK+TASKDATA.pid]
|
||||
; set current PID for lock input
|
||||
mov [PID_lock_input], eax
|
||||
@@:
|
||||
popfd
|
||||
ret
|
||||
;-----------------------------------------------------------------------------
|
||||
align 4
|
||||
.7:
|
||||
mov eax, [PID_lock_input]
|
||||
test eax, eax
|
||||
jz @f
|
||||
; get current PID
|
||||
mov ebx, [CURRENT_TASK]
|
||||
shl ebx, 5
|
||||
mov ebx, [ebx+CURRENT_TASK+TASKDATA.pid]
|
||||
; compare current lock input with current PID
|
||||
cmp ebx, eax
|
||||
jne @f
|
||||
|
||||
|
||||
xor eax, eax
|
||||
mov [PID_lock_input], eax
|
||||
@@:
|
||||
ret
|
||||
;-----------------------------------------------------------------------------
|
||||
uglobal
|
||||
PID_lock_input dd 0x0
|
||||
endg
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; 61 sys function. ;;
|
||||
;; in eax=61,ebx in [1..3] ;;
|
||||
|
Reference in New Issue
Block a user