Thread: how to capture CTRL, SHIFT and ALT ?

  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    10

    how to capture CTRL, SHIFT and ALT ?

    CTRL SHIFT and ALT ?
    They have no ascii or extended ascii, how to capture?
    -------------------

    what's this below? another way of capture keys? how to?
    #define SHIFT_R 0x0001
    #define SHIFT_L 0x0002
    #define CTRL 0x0004
    #define ALT 0x0008
    #define SCROLL_LOCK_ON 0x0010
    #define NUM_LOCK_ON 0x0020
    #define CAPS_LOCK_ON 0x0040


    appreciate.

  2. #2
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Try searching for it on this board.

    The main theme you'll find is that you won't be able to without pulling your hair out.

  3. #3
    Registered User
    Join Date
    Aug 2003
    Posts
    10
    ok,thx.

    what's this below? another way of capture keys? how to?
    #define SHIFT_R 0x0001
    #define SHIFT_L 0x0002
    #define CTRL 0x0004
    #define ALT 0x0008
    #define SCROLL_LOCK_ON 0x0010
    #define NUM_LOCK_ON 0x0020
    #define CAPS_LOCK_ON 0x0040

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,412
    I havent played with this much myself, but I think what it means is that you're dealing with a sequence of 2 characters.

    After you receive 0x00, 0x01 would mean that SHIFT_R has been pressed.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Trapping Ctrl Alt Delete
    By emus21 in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 09-17-2003, 12:10 PM