Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 7, 2010, 8:21:33 PM (14 years ago)
Author:
rgrieder
Message:

Updated OIS source files to its current SVN trunk (r26).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ois_update/src/external/ois/linux/LinuxKeyboard.h

    r5781 r7506  
    3434        {
    3535        public:
    36                 LinuxKeyboard(InputManager* creator, bool buffered, bool grab, bool useXRepeat );
     36                LinuxKeyboard(InputManager* creator, bool buffered, bool grab);
    3737                virtual ~LinuxKeyboard();
    3838
     
    5959
    6060        protected:
     61                inline bool _isKeyRepeat(XEvent &event)
     62                {
     63                        //When a key is repeated, there will be two events: released, followed by another immediate pressed. So check to see if another pressed is present     
     64                        if(!XPending(display))
     65                                return false;
     66
     67                        XEvent e;
     68                        XPeekEvent(display, &e);
     69                        if(e.type == KeyPress && e.xkey.keycode == event.xkey.keycode && (e.xkey.time - event.xkey.time) < 2)
     70                        {
     71                                XNextEvent(display, &e);
     72                                return true;
     73                        }
     74
     75                        return false;
     76                }
     77
    6178                bool _injectKeyDown( KeySym key, int text );
    6279                bool _injectKeyUp( KeySym key );
     
    7592                bool keyFocusLost;
    7693
    77                 bool xAutoRepeat;
    78                 bool oldXAutoRepeat;
    79 
    8094                std::string mGetString;
    8195        };
Note: See TracChangeset for help on using the changeset viewer.