Thread: Specific Keys in C, getting and putting

  1. #16
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > 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.

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

    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,981
    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

Popular pages Recent additions subscribe to a feed