Specific Keys in C, getting and putting

This is a discussion on Specific Keys in C, getting and putting within the C Programming forums, part of the General Programming Boards category; > I still don't understand the 0xE0 Some key presses arrive as a single byte, which a single getch() call ...

  1. #16
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,588
    > I still don't understand the 0xE0
    Some key presses arrive as a single byte, which a single getch() call will retrieve

    Some key presses arrive as 2 bytes, the first being 0x00, which two getch() call will retrieve

    Some key presses arrive as 2 bytes, the first being 0xE0, which two getch() call will retrieve

    What's the difficulty here?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  2. #17
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,161

    Re: Problem solved, but with confusion

    Originally posted by Axpen
    I got and working thanks to the link to here, however, although it solved my problem there was something there I didn't understand, the 0xE0, what significance does that play? I understand 256's role, since extended characters that aren't ASCII have null ASCII code you need more than the first byte of scan code. Even after reading msdn's reference and goldenrock's ASCII key code link I still don't understand the 0xE0 (and yes i'm aware that's 224 in decimal) I still don't understand it.

    Thanks so much everyone,
    Alex
    All function keys are not combined with 0x00. The first byte of some are 0xE0.
    Definition: Politics -- Latin, from
    poly meaning many and
    tics meaning blood sucking parasites
    -- Tom Smothers

  3. #18
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,674
    Originally posted by Axpen
    I got and working thanks to the link ...
    When you're ready for some hardcore Win32 console programming, go through this tutorial.

    gg

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21