Compare commits
2 Commits
cbc0bf4452
...
5682a96d5d
| Author | SHA1 | Date | |
|---|---|---|---|
| 5682a96d5d | |||
| 23fffba99b |
@@ -151,7 +151,7 @@ static void ps2kb_irq (void* arg, void* regs, struct reschedule_ctx* rctx) {
|
||||
|
||||
int32_t keycode = ps2kb_keycode ();
|
||||
|
||||
if (keycode <= 0)
|
||||
if (keycode <= 0 || keycode == 0xFA)
|
||||
return;
|
||||
|
||||
spin_lock (&ps2kb_ringbuffer_lock);
|
||||
@@ -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