Author Topic: Setting keyboard typematic rate and delay...  (Read 3548 times)

xandaz

  • Member
  • **
  • Posts: 108
  • I luv you babe
Setting keyboard typematic rate and delay...
« on: September 09, 2012, 11:10:30 AM »
   i have this code but doesnt change anything in the keyboard. f3 command is supposed to set typematic rate and delay but does nothing. Tried ports 60h and 64h.
Code: [Select]
.586p
.model flat,stdcall
option casemap:none

include \masm32\kmdkit\include\w2k\ntstatus.inc
include \masm32\kmdkit\include\w2k\ntddk.inc
include \masm32\kmdkit\include\w2k\ntoskrnl.inc

includelib \masm32\kmdkit\lib\w2k\ntoskrnl.lib

wdkinc  MACRO   incx
include \masm32\kmdkit\include\w2k\incx.inc
ENDM
wdklib  MACRO   libx
includelib \masm32\kmdkit\lib\w2k\libx.lib
ENDM
.data
wdkinc  ntddk
MyString    db  'Hello!',0

.code

DriverEntry PROC    pDriverObject:DWORD,pRegistryPath:DWORD

    mov     al,0f4h
    out     60h,al
    mov     al,0f3h
    out     60h,al
    xor     al,al
    out     60h,al
    mov     eax,STATUS_SUCCESS
    ret
.....
Thanks
nothing to report.

qWord

  • Member
  • *****
  • Posts: 1473
  • The base type of a type is the type itself
    • SmplMath macros
Re: Setting keyboard typematic rate and delay...
« Reply #1 on: September 09, 2012, 11:24:49 AM »
You maybe forgot that there allready a keyboard driver running?
MREAL macros - when you need floating point arithmetic while assembling!

japheth

  • Guest
Re: Setting keyboard typematic rate and delay...
« Reply #2 on: September 09, 2012, 02:41:54 PM »
Tried ports 60h and 64h.

Port 64h can't be correct, because sending F4h to port 64h usually resets the cpu.

If you want to send something to the keyboard thru port 60h, you first have to check that the keyboard is ready to receive data - IIRC it's bit 1 (or 0?) at port 64h that has to become 0 before you can send something to port 60h.