how to obtain the scan code of a key?

If anybody got the idea please help me...
thanks

Comments

  • : If anybody got the idea please help me...
    : thanks
    :

    why don't you use Virtual Keys? i think it's based on scan key-codes, it distinguishes all buttons on keyboard.
    see at OnKeyDown event
  • : : If anybody got the idea please help me...
    : : thanks
    : :
    :
    : why don't you use Virtual Keys? i think it's based on scan key-codes, it distinguishes all buttons on keyboard.
    : see at OnKeyDown event
    :
    I can use vitrual keys but i still need to convert it to the hardware scan codes.

    What i'm doing is the keyboard designing tool... it means that i have to assign hardware scan codes to key's representation...

  • : : : If anybody got the idea please help me...
    : : : thanks
    : : :
    : :
    : : why don't you use Virtual Keys? i think it's based on scan key-codes, it distinguishes all buttons on keyboard.
    : : see at OnKeyDown event
    : :
    : I can use vitrual keys but i still need to convert it to the hardware scan codes.
    :
    : What i'm doing is the keyboard designing tool... it means that i have to assign hardware scan codes to key's representation...
    :
    :

    windows uses virtual keys only, but i think u can do it like in ancient ages in TP with use of a little assembler...try with this:

    [code]
    function GetKey:word; assembler;
    asm
    xor ah,ah
    int 16h
    end;
    [/code]


    i did not try it, i'm not sure if it works, but i hope so

  • : : : If anybody got the idea please help me...
    : : : thanks
    : : :
    : :
    : : why don't you use Virtual Keys? i think it's based on scan key-codes, it distinguishes all buttons on keyboard.
    : : see at OnKeyDown event
    : :
    : I can use vitrual keys but i still need to convert it to the hardware scan codes.
    :
    : What i'm doing is the keyboard designing tool... it means that i have to assign hardware scan codes to key's representation...
    :
    :

    windows uses virtual keys only, but i think u can do it like in ancient ages in TP with use of a little assembler...try with this:

    [code]
    function GetKey:word; assembler;
    asm
    xor ah,ah
    int 16h
    end;
    [/code]


    i did not try it, i'm not sure if it works, but i hope so

  • : If anybody got the idea please help me...
    : thanks
    :
    My method is to create a new project and, in an OnKeyPress event, I
    write this: "Form1.Caption := Key;" and execute it. Then I press the key that I want to know the code, and the code appears in the Form's caption. You may try in an OnKeyDown or OnKeyUp event, but you have to convert the Key into a string ("Form1.Caption := IntToStr(Key);").
  • : If anybody got the idea please help me...
    : thanks
    :
    This question has been asked/answered before..
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories