fixed keychord handling

aaaaah ha ha ha ha blurgh blurgh blurgh ha
plus other minor debugging as well.