Most modern Linux distributions default to standard Windows key bindings, so the Windows key on your keyboard works perfectly fine without needing any work. However, those using very lightweight or even deprecated versions of Debian or Fedora/RHEL will need to make sure a configuration file is present in their home directory. This can also be used to create custom key bindings if at all necessary.
Creating a simple hidden file will fix this problem, and it can be easily removed with the rm command or a graphical file manager if it created any sort of problem. Only do this if you haven’t been able to get Linux to recognize that your Windows or menu keys are there. They’re generally going to be fine in most distributions that aren’t old school style.
Method 1: Create Windows Key Bindings in Redhat-derived (RHEl, Fedora) Distributions
Hold CTRL, ALT and T to open up a graphical terminal and then type cd ~ and push enter to get to your home directory. Type the following commands with return after each line:
cat >> .Xmodmap
After you reach the last line push CTRL+D and then log out and back into your desktop environment to standardize the changes. Of course you’ll need to use your desktop manager or other software to define functions for F13, F14 and F15, which is why you shouldn’t do this if the Windows keys already work.
Method 2: Create Windows Key Bindings in Debian
You’ll also need to hold CTRL, ALT and T to open up a terminal and type cd ~ to get to your home directory before issuing these following commands with a return after each of them:
cat >> .xmodmaprc
keycode 115=F13 #left windows key
keycode 116=F14 #right windows key
keycode 117=F15 #right menu key
Once you reach the end you’ll need to push CTRL+D and then also log out and then back in again. Again you’ll not want to do this if everything seems to be working fine or if your desktop manager can assign your Windows key a function already.