is it possible to intercept keystrokes using wxruby?
Luis G. G?mez wrote:> is it possible to intercept keystrokes using wxruby?Could you be a little more specific? Nick
I have this: ==== require "wxruby" include Wx class MinimalApp < App def on_init Frame.new(nil, -1, "The Bare Minimum",Point.new(0,0),Size.new(0,0),MAXIMIZE).show() end end MinimalApp.new.main_loop ==== What I want to do is block the use of Alt+Tab so users cannot switch applications. Usefull for kiosk-like applications. Thank you, LG Nick wrote:> Luis G. G?mez wrote: > >> is it possible to intercept keystrokes using wxruby? > > > Could you be a little more specific? > > Nick > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users
Since Alt-Tab is system recognized, wxWidgets can''t intercept it. You might have better luck with the Win32 tools. Nick Luis G. G?mez wrote:> I have this: > > ====> > require "wxruby" > include Wx > class MinimalApp < App > def on_init > Frame.new(nil, -1, "The Bare > Minimum",Point.new(0,0),Size.new(0,0),MAXIMIZE).show() > end > end > MinimalApp.new.main_loop > > ====> > What I want to do is block the use of Alt+Tab so users cannot switch > applications. Usefull for kiosk-like applications. > > Thank you, > > LG > > Nick wrote: > >> Luis G. G?mez wrote: >> >>> is it possible to intercept keystrokes using wxruby? >> >> >> >> Could you be a little more specific? >> >> Nick >> _______________________________________________ >> wxruby-users mailing list >> wxruby-users@rubyforge.org >> http://rubyforge.org/mailman/listinfo/wxruby-users > > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > >
Ok, sorry. I changed to this but it does nothing:
====require "wxruby"
include Wx
class ClientFrame < Frame
def initialize()
super(nil,-1,"Pathology
Software",Point.new(0,0),Size.new(0,0),MAXIMIZE)
evt_key_down{|event|nil}
show()
end
end
class PathologySoft < App
def on_init
ClientFrame.new()
end
end
PathologySoft.new.main_loop
====
Nick wrote:> Luis G. G?mez wrote:
>
>> is it possible to intercept keystrokes using wxruby?
>
>
> Could you be a little more specific?
>
> Nick
> _______________________________________________
> wxruby-users mailing list
> wxruby-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wxruby-users
Win32 Tools? Nick wrote:> > Since Alt-Tab is system recognized, wxWidgets can''t intercept it. You > might have better luck with the Win32 tools. > > Nick > > Luis G. G?mez wrote: > >> I have this: >> >> ====>> >> require "wxruby" >> include Wx >> class MinimalApp < App >> def on_init >> Frame.new(nil, -1, "The Bare >> Minimum",Point.new(0,0),Size.new(0,0),MAXIMIZE).show() >> end >> end >> MinimalApp.new.main_loop >> >> ====>> >> What I want to do is block the use of Alt+Tab so users cannot switch >> applications. Usefull for kiosk-like applications. >> >> Thank you, >> >> LG >> >> Nick wrote: >> >>> Luis G. G?mez wrote: >>> >>>> is it possible to intercept keystrokes using wxruby? >>> >>> >>> >>> >>> Could you be a little more specific? >>> >>> Nick >>> _______________________________________________ >>> wxruby-users mailing list >>> wxruby-users@rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wxruby-users >> >> >> _______________________________________________ >> wxruby-users mailing list >> wxruby-users@rubyforge.org >> http://rubyforge.org/mailman/listinfo/wxruby-users >> >> >> > > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users