From: Martin DeMello Date: 2005-01-07T14:46:28+09:00 Subject: Re: FXRuby: Reading keystates Lyle Johnson wrote: > On Fri, 7 Jan 2005 02:28:20 +0900, Simon Strandgaard wrote: > > > def onKeypress(sender, sel, event) > > p "keysym=#{event.code} state=#{event.state} text=#{event.text}" > > if (event.state & CONTROLMASK) != 0 > > if event.text == 'a' > > p "we got a" > > end > > end > > end > > I would change one thing, and that is to check the event.code field > instead of the event.text field, i.e. Thanks to both of you! martin