View Single Post
Old 03-08-2012, 09:07 AM   #71
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
Good point. I think a fellow developer on the PDF reader project implemented something like this there: https://github.com/hwhw/kindlepdfvie...aster/keys.lua line 181 onwards.

It's probably overkill to ask for the setting upon each key press, so this could be done once, e.g. by putting it on global level (i.e. not in a function).

That's the nice thing when you use a programming language as configuration language :-)

Edit: Ah, dave beat me to it. That's often the case lately :-P (it's a good thing...). Yep, my preference for Lua had its effect on both projects. It's just so damn easy to integrate into C code and really helps people to realize complex szenarios.

Last edited by hawhill; 03-08-2012 at 09:09 AM.
hawhill is offline   Reply With Quote