Add keyboard event handler to shell

This commit is contained in:
Juhani Krekelä 2023-03-20 20:53:13 +02:00
parent ede350fd40
commit cd98221d85
1 changed files with 16 additions and 0 deletions

View File

@ -94,13 +94,21 @@ process_event:
cmp al, WM_PAINT
jne .not_paint
call paint
jmp .end
.not_paint:
cmp al, WM_MOUSE
jne .not_mouse
call mouse
jmp .end
.not_mouse:
cmp al, WM_KEYBOARD
jne .not_keyboard
call keyboard
.not_keyboard
.end:
pop es
pop ds
pop bp
@ -181,6 +189,14 @@ mouse:
call forward_event
ret
keyboard:
call get_window
mov si, [si + window.data]
add si, 20
mov [si], cl
call request_redraw
ret
; in:
; bx = valid window id for this process
; out: