I recently had to use Kali Linux. I downloaded their pre-built virtualbox image. Problem is that I have Danish keyboard layout and Kali comes with US layout. Changing the Keyboard layout in Settings does not seem to work.
Luckily, this can be changed via command-line with this command:
setxkbmap -layout <country code>
For Danish layout this is:
setxkbmap -layout dk