Just to add this info in case it helps someone else. I had this exact problem with a Logitech G510 keyboard, and TS 3.0.19.3.

The only way I got my keyboard to work while connected to a server was...