Next Previous Contents

7. Using IceWM With The Keyboard

It should be possible to control everything by keyboard. Here we show some of the not so obvious ways to achieve important window managing tasks only with keystrokes.

7.1 Basic predefined keyboard shortcuts

Alt-Tab = Switches between the open windows
Alt-F4 = Closes a window
Alt-F9 = Minimizes a window
Alt-F10 = Maximizes a window
Alt-F12 = Rolls the window up
(leaving only the titlebar visible, press Alt-F12 again and the window rolls back down)
Alt-Shift-F10 = Maximizes the window vertically 
Alt-Ctrl-arrow left = Changes workspaces from 1-12
Alt-Ctrl-arrow right = Changes workspaces from 12-1
Alt-Ctrl-Esc = Opens the  window list
Ctrl-Esc = Opens the  menu

7.2 Switching Desktop using keyboard

You are accustomed to a window manager that allows you to switch between virtual desktops using your keyboard? IceWM allows for this, too.

Before I describe how to switch between virtual desktops I want to describe how to control their number. Imagine that your $HOME/.icewm/preferences has a row reading


This setting results in ten virtual desktops and ten buttons in your taskbar looking like this:

    | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |

If you name less desktops you obtain less if you name more you get more.

For understanding how switching virtual desktops works in IceWM you should imagine that the buttons represent your virtual desktops and that these desktops are arranged in one long row.

You can imagine two ways of switching between desktops:

IceWM has both ways:

"Cursor_Left" ("Cursor_Right") represents the key that moves your cursor one character to the left (right).

If you are using "Ctrl-Alt-Cursor_Right" on the rightmost desktop you switch to the leftmost desktop. From here, "Ctrl-Alt-Cursor_Left" brings you back to the rightmost desktop.

What if you have more than ten virtual desktops? In this case "Ctrl-Alt-n" will only work for the first ten desktops while switching to the left or right still works for all desktops.

IceWM has another feature to offer: You may not only use your keyboard to switch desktops, you can also use it to move windows from one desktop to another. The next section is on this (you should read it, too).

Note: To switch desktops when moving mouse on desktop edges use preference:

then you can change workspaces automatically by moving your cursor to the left/right edges of your screen.

7.3 Moving windows between desktops using keyboard

In the previous section I explained how to switch between desktops. If you didn't already read it you should do it now because moving the active window to another desktop works almost the same like switching to a certain desktop. All you have to do is pressing the "Shift" while switching to the desktop:

7.4 Using the CLI (command line interface)

You should run IceWM with "TaskBarDoubleHeigth=1" because that will enable the CLI (see What is the blank bar in the task bar good for? for some more information).

The CLI is especially useful if you rather frequently need to access man pages and don't want to have xman hang around all the time.

If you enter man perl and press "Ctrl-ENTER" an XTerm will pop up displaying the main Perl man page. If you press "q" not only the man page no longer is displayed but the XTerm will terminate, too.

This only is one example of how to use the CLI. You can use it to issue any other command as well. A problem that might occur is that the XTerm will terminate before you had time to read the output of a command (it terminates as soon as the command is done).

In most such cases it is sufficient to pipe the output through less (this is one of the rare cases you cannot use more because it terminates after displaying the last line). However, there are cases (mainly programs that write colorful output such as ls) that may result in trouble with less.

Fortunately Linux (any Unix version?) offers a solution to these cases, too: The sleep command. It sleeps some time, then terminates. So you could use

    ls $HOME/bin --color ; sleep 1m

to list all programs in your $HOME/bin directory. The sleep command will wait the given period of time (in this case a minute) before the XTerm automatically will close (you can use "Ctrl-C" to abort the sleep command before that time went by).

7.5 May I use Win(95) keys with IceWM?

Sure you can. Josef Oswald reported:

this is in .xinitrc

clear mod4
keycode 64 = Alt_L
keycode 113 = Alt_R
keycode 115 = Meta_L
keycode 116 = Meta_R
add Mod4 = Meta_L Meta_R

in .Xmodmap there is:

add Mod1 = Alt_L
add Mod2 = Mode_switch
keycode 117 = Menu 

and then in


Win95Keys=1 # was 0

# KeySysWinMenu="Shift+Esc"

as can be seen I did _not_ enable the above, as I don't like pressing two keys. If one wants to use it, it does work.

On a free workspace the right Win95 opens the list of Workspaces.

Now also in Open-office I can use the right menu key to open the menus in the OOo taskbar with the letters for the shortcut I can switch to the desired menu without needing to leave the keyboard, my preferred way of working on the pc.

Next Previous Contents