Move HTML elements by keyboard arrow keys, with different constraints modi