Help with key codes

This is the key code I need to know:

what is the key code for "enter"?

eg. Shift key is 0

Comments

  • : This is the key code I need to know:
    :
    : what is the key code for "enter"?
    :
    : eg. Shift key is 0
    :
    13
  • : : This is the key code I need to know:
    : :
    : : what is the key code for "enter"?
    : :
    : : eg. Shift key is 0
    : :
    : 13
    :
    I don't know pascall, so if this seems completly wrong then don't read it ;-)

    No, 13 is the ascii for newline, the makecode for Enter is 36.
    What does keycode really mean?
    The return value of INT 21h,1 (aka getc() in C in windows)?
  • : : : This is the key code I need to know:
    : : :
    : : : what is the key code for "enter"?
    : : :
    : : : eg. Shift key is 0
    : : :
    : : 13
    : :
    : I don't know pascall, so if this seems completly wrong then don't read it ;-)
    :
    : No, 13 is the ascii for newline, the makecode for Enter is 36.
    : What does keycode really mean?
    : The return value of INT 21h,1 (aka getc() in C in windows)?
    :
    13 isn't newline, but cariage return (returns cursor to first character). newline is 10. The distinction comes from the old mechanical type-writers. The string 'abc'#10'def' should look like this:
    [code]
    abc
    def
    [/code]
    while 'abc'#13'def' is
    [code]
    def
    [/code]
    and 'abc'#13#10'def' and 'abc'#10#13'def':
    [code]
    abc
    def
    [/code]
    KeyCode is the code, which is returned by the ReadKey() function. This function maps the "normal" keys to ASCII mapping, while the extended keys are mapped in a 16-bit code space.

  • : : I don't know pascall, so if this seems completly wrong then don't read it ;-)
    : :
    : : No, 13 is the ascii for newline, the makecode for Enter is 36.
    : : What does keycode really mean?
    : : The return value of INT 21h,1 (aka getc() in C in windows)?
    : :
    : 13 isn't newline, but cariage return (returns cursor to first character). newline is 10. The distinction comes from the old mechanical type-writers. The string 'abc'#10'def' should look like this:

    Oops, I mixed them up...

    : KeyCode is the code, which is returned by the ReadKey() function. This function maps the "normal" keys to ASCII mapping, while the extended keys are mapped in a 16-bit code space.
    :
    :
    OK, so then it's eqvivalent with INT 21h,1

    Thanks and happy programming!!!
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

In this Discussion