Following on from my previous post. I have been working on fixing the keyboard mapping issue.
From this I have created a new X11 keyboard configuration file for the UK / GB keyboard layout. This now works, so at least pressing shift 2 gives “ and not @ which would happen on a US keyboard and was happening previously.
Now this is working, it is a little easier to play nethack as @ turns auto pickups off, which is very helpful when you don't want to pick up everything you come across.