This small guide explains how to map the Windows key in order to use it as a modifier, under Ubuntu. This guide also shows how to map common Windows Key shortcuts so that the behavior is similar to default Windows functionality. This whole process is accomplished using the 'xmodmap' utility.

First, we will need to edit or create the .xstartup file. This file is run when the GUI is started, and will give persistence to this modification. If the file exists, open your favorite text editor then edit to include the following commands. If the file does not exist, add the following to a new file and save it to "/home/user/.xstartup".

# Make the Windows key a useable mod key:
xmodmap -e "remove mod4 = F13"
xmodmap -e "keycode 115 = Super_L"
xmodmap -e "add mod4 = Super_L"

Note: You can type these three commands directly in a terminal window to test them. If the first command returns commandline:1: bad remove modifier keysym list (empty), then simply delete it or add a # before it to comment it out.

Map Keys

In order to create your key shortcuts, you will need to open the Keyboard Shortcuts window from the System > Preferences menu. Click on the shortcut you want to create, then assign your key combination.

For example, if you want to copy the "Run" dialog box functionality from Windows (Win+R), just click on Show the panel run application dialog, then press Win+R at the same time.

Common Windows Shortcut Key Combinations

Key

Keyboard Shortcuts Item Name

Windows equivalent

Win+R

Show the panel run application dialog

Run dialog

Win+E

Home Folder

Windows Explorer (or My Documents)

Win+L

Lock Screen

Lock Screen

Win+F

Search

Search Files or Folders

Win+M

Hide all windows and focus desktop

Minimize all windows, showing desktop

Win+D

Hide all windows and focus desktop

Bring desktop to front, minimizing all windows


MappingWindowsKey (last edited 2014-04-17 15:39:36 by kevin-bezold)