Added key input management for magnet attraction (for desktop debug purposes).