My take on official code from http://pktriggercord.sourceforge.net svn repository. Added functionality to enable/disable Pentax camera debug mode. This is especially useful for cameras that don't have AF correction menus (like K10D).