fixed lock mask for num and scroll lock
This commit is contained in:
parent
040f8a6556
commit
3e3166af39
1 changed files with 6 additions and 1 deletions
|
@ -19,12 +19,13 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// $Id: TextBox.cc,v 1.1 2003/08/26 23:24:48 fluxgen Exp $
|
// $Id: TextBox.cc,v 1.2 2003/09/08 21:26:19 fluxgen Exp $
|
||||||
|
|
||||||
#include "TextBox.hh"
|
#include "TextBox.hh"
|
||||||
#include "Font.hh"
|
#include "Font.hh"
|
||||||
#include "EventManager.hh"
|
#include "EventManager.hh"
|
||||||
#include "App.hh"
|
#include "App.hh"
|
||||||
|
#include "KeyUtil.hh"
|
||||||
|
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
|
@ -183,6 +184,10 @@ void TextBox::buttonPressEvent(XButtonEvent &event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextBox::keyPressEvent(XKeyEvent &event) {
|
void TextBox::keyPressEvent(XKeyEvent &event) {
|
||||||
|
// strip numlock and scrolllock mask
|
||||||
|
event.state &= ~FbTk::KeyUtil::numlockMod();
|
||||||
|
event.state &= ~FbTk::KeyUtil::scrolllockMod();
|
||||||
|
|
||||||
KeySym ks;
|
KeySym ks;
|
||||||
char keychar[1];
|
char keychar[1];
|
||||||
XLookupString(&event, keychar, 1, &ks, 0);
|
XLookupString(&event, keychar, 1, &ks, 0);
|
||||||
|
|
Loading…
Reference in a new issue