- Timestamp:
- Oct 7, 2010, 8:21:33 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ois_update/src/external/ois/linux/LinuxKeyboard.h
r5781 r7506 34 34 { 35 35 public: 36 LinuxKeyboard(InputManager* creator, bool buffered, bool grab , bool useXRepeat);36 LinuxKeyboard(InputManager* creator, bool buffered, bool grab); 37 37 virtual ~LinuxKeyboard(); 38 38 … … 59 59 60 60 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 61 78 bool _injectKeyDown( KeySym key, int text ); 62 79 bool _injectKeyUp( KeySym key ); … … 75 92 bool keyFocusLost; 76 93 77 bool xAutoRepeat;78 bool oldXAutoRepeat;79 80 94 std::string mGetString; 81 95 };
Note: See TracChangeset
for help on using the changeset viewer.