Tuesday, February 5, 2008

gtk-perl and focus; Gtk2::Gdk::Keysyms; asciidoc

you need to have the focus or even just focus capability for the keyboard entries
to have any affect on a widget.

thus drawingarea needs $drawing->can_focus to capture signals from key_press_event
events;

thus its not enough to do add_events

(also: I am not sure: perhaps if you do -> can focus, you may not even need set_events(["key-press-event]) in the flag .. )

*************************
use Gtk2::Gdk::Keysyms;

this gives you a LOT of flexibility in using keypress events

whereas the a valid flag for the $state= $event->state; flags does not include all of them
thus we have a Control_L or Control_R in Gtk2::Gdk::Keysyms;
as well as Alt_L and Alt_R, they don't exist in the this list of valid state flags....

Invalid flags GdkModifierType value control-l-mask, expecting: shift-mask / GDK_SHIFT_MASK, lock-mask / GDK_LOCK_MASK, control-mask / GDK_CONTROL_MASK, mod1-mask / GDK_MOD1_MASK, mod2-mask / GDK_MOD2_MASK, mod3-mask / GDK_MOD3_MASK, mod4-mask / GDK_MOD4_MASK, mod5-mask / GDK_MOD5_MASK, button1-mask / GDK_BUTTON1_MASK, button2-mask / GDK_BUTTON2_MASK, button3-mask / GDK_BUTTON3_MASK, button4-mask / GDK_BUTTON4_MASK, button5-mask / GDK_BUTTON5_MASK, super-mask / GDK_SUPER_MASK, hyper-mask / GDK_HYPER_MASK, meta-mask / GDK_META_MASK, release-mask / GDK_RELEASE_MASK, modifier-mask / GDK_MODIFIER_MASK a


see man Gtk2::Gdk::Keysyms for more information.



***************************
asciidoc

an interesting python program
it generates man/html/docbook/can generate pdf
from ascii format similar to that used by mjd in txt2slides

Thus is a python program similar to the
marc dominus perl program
txt2slides. tgz which itself uses
txt2html by seth golub which uses a
model of html.pl package of Oscar Nierstrasz
which is similar to CGI.pm module conversions to html.

general idea

this is a header
*************

No comments: