For my first hardware hack I'm taking a stab at a 'mechanical keyboard from scratch' (where scratch means individual components).
I plan to use a teensy++ board (16MHz) and was wondering about how to scan for key presses, so far I was thinking of using a grid (matrix) for the keys, every row is an out pin and every column is a in pin, the switches connect them (along with a diode for limiting the direction of current to lessen ghosting).
So there would be a scanning cycle, during which a column is set to high (or low, depending) and then every row is tested for this value. My question concerns whether or not this would be accurate enough, it means that the switch has to be closed at the exact moment that row and column are checked otherwise the key wont be registered at all. Is this how it is done or is there some much better approach?
There is also the issue of key bounce, so either a delay between checking the same key (could be a result of the scanning loop) and/or a counter where a certain key to be activated a number of times.
Thanks in advance :)