On 19.02.2012 14:56, Anurag Priyam wrote: > It feels silly to return true from the callback to keygrabber.run to > keep grabbing. Isn't it more obvious to keep grabbing unless it is > instructed by calling `keygrabber.stop`? I can't see how it makes it > easier to use keygrabber in any use case (from awesomerc). Maybe > because I have seen very limited examples of keygrabber in action. Or > is it because the limitation of Lua's C API? I can't really make out > from the code how/when the callback is called and where is its return > value checked for. Pointers? I would like to change it if possible.
keygrabber.run() saves the given function in globalconf.keygrabber. This function is then called from event.c in event_handle_key(). This code also checks the return value from the function via lua_isboolean() and lua_toboolean() (event.c, line 519) and possibly calls keygrabber.stop(). Uli -- my $key = "\x49\x03\x93\x08\x19\x94\x96\x94\x28\x93\x83\x04\x68\x28\xa8\xf5". "\x0a\xb9\x94\x02\x45\x81\x93\x1f\xbc\xd7\xf3\xad\x93\xf5\x32\x93"; my $cipher = Crypt::Rijndael->new( $key, Crypt::Rijndael::MODE_ECB() ); my $plain = $ciper->decrypt($daten); -- To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.