fixed lock mask for num and scroll lock

This commit is contained in:
fluxgen 2003-09-08 21:26:19 +00:00
parent 040f8a6556
commit 3e3166af39

View file

@ -19,12 +19,13 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// 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 "Font.hh"
#include "EventManager.hh"
#include "App.hh"
#include "KeyUtil.hh"
#include <cctype>
#include <X11/keysym.h>
@ -183,6 +184,10 @@ void TextBox::buttonPressEvent(XButtonEvent &event) {
}
void TextBox::keyPressEvent(XKeyEvent &event) {
// strip numlock and scrolllock mask
event.state &= ~FbTk::KeyUtil::numlockMod();
event.state &= ~FbTk::KeyUtil::scrolllockMod();
KeySym ks;
char keychar[1];
XLookupString(&event, keychar, 1, &ks, 0);