Hello,
How do you change the keyboard typing rate (what ports and what data must be sent to them)?
Thanks for any help.
The keyboard typing rate
Re:The keyboard typing rate
Hi,
The repeat rate and delay values are avaliable at:
http://panda.cs.ndsu.nodak.edu/%7Eachap ... board.html
The keyboard should send an "ACK" (0xFA) in response.
Cheers,
Brendan
You'd send the command 0xF3 to the keyboard controller chip, followed by a byte containing the repeat rate and delay:ManOfSteel wrote: How do you change the keyboard typing rate (what ports and what data must be sent to them)?
Code: Select all
mov al,0xf3
call sendData
jc .exit
mov al,[keydevArate] ;al = default repeat rate and delay
call sendData
Code: Select all
%define STATUSPORT 0x64
%define COMMANDPORT 0x64
%define DATAPORT 0x60
;Send data to controller or device A
;_______________________________________________________________________________
sendData:
pushes ebx,ecx
push eax
mov ebx,[SIBtickHigh]
mov ecx,[SIBtickOver]
add ebx,1
adc ecx,0
OSCALL 0x39 ;Sleep for 1 mS
mov ebx,[SIBtickHigh]
mov ecx,[SIBtickOver]
add ebx,100 ;100 mS timout
adc ecx,0
.sd1 in al,STATUSPORT
test al,controllerInputFull
je .sd2
cmp [SIBtickOver],ecx
jb .sd1
cmp [SIBtickHigh],ebx
jbe .sd1
pop eax
pops ebx,ecx
stc
ret
.sd2 pop eax
out DATAPORT,al
pops ebx,ecx
clc
ret
http://panda.cs.ndsu.nodak.edu/%7Eachap ... board.html
The keyboard should send an "ACK" (0xFA) in response.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
-
- Posts: 17
- Joined: Fri Jun 12, 2020 7:53 am
- Libera.chat IRC: lukeythekid
Re: The keyboard typing rate
For fellow searchers finding this page far in the future from 2004, the wiki now has these type rate and delay values as well. Command code 0xF3 still applies 
https://wiki.osdev.org/PS/2_Keyboard#Commands

https://wiki.osdev.org/PS/2_Keyboard#Commands