Ignore:
Timestamp:
Aug 20, 2006, 8:11:44 AM (19 years ago)
Author:
bird
Message:

Expanded m_client to 64-bit. Finally managed to hack together a getKeyMap and fakeKey for PM.

File:
1 edited

Legend:

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

    r2765 r2768  
    113113        no such key.
    114114        */
    115         static KeyID            getKeyID(ULONG virtualKey, KeyButton button);
     115        KeyID                   getKeyID(ULONG virtualKey, KeyButton button, bool fNumPadKey, USHORT usChar);
    116116
    117117        //@}
     
    142142
    143143private:
     144        typedef union {
     145                /** the 64-bit data view. */
     146                UInt64                  u;
     147                /** the struct view. */
     148                struct
     149                {
     150                        /** The pm scan code. */
     151                        unsigned        xlatScan : 8;
     152                        /** The char. */
     153                        unsigned        xlatChar: 8;
     154                        /** The raw scan code. */
     155                        unsigned        scan : 7;
     156                        /** KDD_EXTENDEDKEY. */
     157                        unsigned        fExtendedKey : 1;
     158                        /** The pm scan code of the 2nd message. */
     159                        unsigned        xlatScan2 : 8;
     160                        /** The char of the 2nd message. */
     161                        unsigned        xlatChar2: 8;
     162                        /** The raw scan code of the 2nd message. */
     163                        unsigned        scan2 : 7;
     164                        /** KDD_SECONDARY. */
     165                        unsigned        fSecondary : 1;
     166                        /** The virtual key. */
     167                        unsigned        virtualKey : 7;
     168                        /** KC_DEADKEY. */
     169                        unsigned        fDeadKey : 1;
     170                        /** KC_COMPOSITE. */
     171                        unsigned        fComposite : 1;
     172                        /** shift key. */
     173                        unsigned        fShiftKey : 1;
     174                        /** Indicates that the key requires the xlscan=2a KDD_SECONADARY+KDD_UNDEFINED+KDD_UNDEFINED
     175                         * key if numlock is effective. */
     176                        unsigned        fNeedNumUnlockKey : 1;
     177                        /** Bits we haven't used yet. */
     178                        unsigned    fReserved : 4;
     179                } s;
     180        } ClientData;
     181
     182        void                            convertScancodes(ClientData *pData);
    144183        KeyID                           getIDForKey(CKeyMap::KeyItem& item,
    145184                                                        KeyButton button, ULONG virtualKey,
     
    160199        KeyToVKMap                      m_keyToVKMap;
    161200
     201        // scan code conversions.
     202        UInt8                           m_pmScanToOemScan[256];
     203        UInt8                           m_pmScanToOemScanExt[256];
     204        UInt8                           m_oemScanToPmScan[128];
     205        UInt8                           m_oemScanToPmScanExt[128];
     206
    162207    // function which can inject fake WM_CHAR messages.
    163208    FakeMsgFunc                 m_fakeMsg;
     
    180225        KeyModifierMask         m_originalSavedModifiers;
    181226
    182         static const KeyID      s_virtualKey[0x42];
     227    typedef struct {
     228        KeyID           key;
     229        unsigned char   ch;
     230        bool            numpad;
     231        char            extended;
     232    } VirtualKey;
     233        static const VirtualKey s_virtualKey[0x42];
    183234};
    184235
Note: See TracChangeset for help on using the changeset viewer.