[ruby-gnome2-doc-cvs] [Hiki] create - tips_key_pressed

Zurück zum Archiv-Index

ruby-****@sourc***** ruby-****@sourc*****
2003年 10月 12日 (日) 21:48:14 JST


-------------------------
REMOTE_ADDR = 218.231.205.39
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/?tips_key_pressed
-------------------------
= Investigate what key is pressed
Run this sample and press key what you investigate.

 require 'gtk2'
 Gtk.init
 
 window = Gtk::Window.new
 window.add_events(Gdk::Event::KEY_PRESS)
 window.add(Gtk::Label.new("Press Key!"))
 
 window.signal_connect("key-press-event") do |w, e|
   p "#{e.keyval}, Gdk::Keyval::GDK_#{Gdk::Keyval.to_name(e.keyval)}"
 end
 
 window.set_default_size(100, 100).show_all
 
 Gtk.main

== ChangeLog
:2003-10-12 ((<Masao>))
 Initial Release





ruby-gnome2-cvs メーリングリストの案内
Zurück zum Archiv-Index