fixed lock mask for num and scroll lock
fluxgen fluxgen
1 files changed,
6 insertions(+),
1 deletions(-)
jump to
M
src/FbTk/TextBox.cc
→
src/FbTk/TextBox.cc
@@ -19,12 +19,13 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// 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 @@ setInputFocus();
} 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);