Ignore:
Timestamp:
Aug 14, 2006, 6:55:06 AM (19 years ago)
Author:
bird
Message:

hacking on keyboard stuff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/synergy/lib/platform/CPMUtil.h

    r2761 r2765  
    33 * Copyright (C) 2004 Chris Schoeneman
    44 * Copyright (C) 2006 Knut St. Osmundsen
    5  * 
     5 *
    66 * This package is free software; you can redistribute it and/or
    77 * modify it under the terms of the GNU General Public License
    88 * found in the file COPYING that should have accompanied this file.
    9  * 
     9 *
    1010 * This package is distributed in the hope that it will be useful,
    1111 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     
    3737        */
    3838        static CString          getErrorString(HMODULE hmod, ULONG error, ULONG id);
    39    
     39
    4040    static HAB          getHAB(void);
    4141    static HMQ          getHMQ(HAB hab = NULLHANDLE);
     
    4343};
    4444
     45
     46/** The WinTranlateChar2 operation. */
     47typedef enum WINTCOP
     48{
     49    TC_CHARTOSCANCODE = 0,
     50    TC_SCANCODETOCHAR,
     51    TC_VIRTUALKEYTOSCANCODE,
     52    TC_SCANCODETOVIRTUALKEY,
     53    TC_SCANTOOEMSCAN,
     54    TC_OEMSCANTOSCAN,
     55    TC_SIZE_HACK = 0x7fff
     56} WINTCOP;
     57
     58/** @name WinTranslateChar2 shift state.
     59 * This state goes with scancode input/output.
     60 * @{ */
     61#define TCF_LSHIFT          0x1
     62#define TCF_RSHIFT          0x2
     63#define TCF_SHIFT           (TCF_LSHIFT | TCF_RSHIFT)
     64#define TCF_LCONTROL        0x4
     65#define TCF_RCONTROL        0x8
     66#define TCF_CONTROL         (TCF_LCONTROL | TCF_RCONTROL)
     67#define TCF_ALT             0x10
     68#define TCF_ALTGR           0x20
     69#define TCF_CAPSLOCK        0x40
     70#define TCF_NUMLOCK         0x80
     71#define TCF_MAX_BITS        8       /**< bits 0-7 are real shift states */
     72#define TCF_OEMSCANCODE     0x100
     73#define TCF_EXTENDEDKEY     0x200
     74/** @} */
     75
     76/**
     77 * Char to/from keyboard code translator.
     78 *
     79 * @returns A combination of some of the KC_* values.
     80 * @param   usCodePage          The code page. Anything goes, apparently ignored.
     81 * @param   pusCharInOut        Where to get the char/code to be translated and to
     82 *                              put the output upon return.
     83 * @param   pulDeadKeyInfo      Previous, dead key.
     84 * @param   enmOperation        The kind of translation.
     85 * @param   pfShiftState        Where to read/store the shift state. Used when
     86 *                              translating from/to scancodes.
     87 * @remark  PMWIN.1070
     88 */
     89extern "C"
     90USHORT APIENTRY WinTranslateChar2(USHORT  usCodePage,
     91                                  PUSHORT pusCharInOut,
     92                                  PULONG  pulDeadKeyInfo,
     93                                  WINTCOP enmOperation,
     94                                  PUSHORT pfShiftState);
     95
    4596#endif
     97
Note: See TracChangeset for help on using the changeset viewer.