Working with virtual servers (accessed from various locations/countries), we’re often faced with situations like this: the server has a UK or FR layout and our keyboard is US. To get around this we can reload the key map. One command that works on all Linux platforms is loadkeys. E.g. to load the US layout:

loadkeys us  

However I recently got a situation where loadkeys would not work on Debian. Here’s a fix:

dpkg-reconfigure keyboard-configuration