PS/2 KB driver set typematic delay to 250ms for smoother typing
This commit is contained in:
@@ -217,6 +217,18 @@ int ps2kb_read_key (struct device* device, struct proc* proc, struct reschedule_
|
||||
return ST_OK;
|
||||
}
|
||||
|
||||
static void ps2kb_set_typematic (uint8_t delay, uint8_t rate) {
|
||||
while (inb (KB_CTL_STATUS) & 0x02)
|
||||
;
|
||||
|
||||
outb (KB_DATA, 0xF3);
|
||||
|
||||
while (inb (KB_CTL_STATUS) & 0x02)
|
||||
;
|
||||
|
||||
outb (KB_DATA, (delay << 5) | (rate & 0x1F));
|
||||
}
|
||||
|
||||
bool ps2kb_init (struct device* device, void* arg) {
|
||||
(void)device, (void)arg;
|
||||
|
||||
@@ -237,6 +249,9 @@ bool ps2kb_init (struct device* device, void* arg) {
|
||||
outb (KB_CTL_STATUS, 0x60);
|
||||
outb (KB_DATA, cb);
|
||||
|
||||
/* 250ms delay, 30hz rate */
|
||||
ps2kb_set_typematic (0x00, 0x00);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user