Added key input management for magnet attraction (for desktop debug purp...

...oses).