No announcement yet.

Getting Keyboard Layout (scancode to ASCII)?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting Keyboard Layout (scancode to ASCII)?

    Does anybody know of a means to retrieve the user's current
    keyboard layout, under DOS? In Windows, there are API functions
    which convert key scan codes into virtual key codes and ASCII
    values, and vice versa; but I did not find a corresponding DOS
    function so far.
    - Of course, calls to Interrupt 16h return both the scancode and
    the ASCII character of a key pressed - but only if a key is
    pressed. What I would like to do is to display on the screen a
    drawing which correctly represents the user's keyboard,
    indepently from the current country-specific layout. So I would
    need to convert scancodes into ASCII characters without actually
    a key being pressed. Is there a way to achieve this under DOS?

    Hans Ruegg

  • #2
    Can't do it under DOS or Windows. Neither knows about the installed
    keyboard except in very broad terms.

    Tom Hanlin
    PowerBASIC Staff