It works
by grabbing the keyboard itself; the foreground and background colors in the xterm
window are reversed as long as the keyboard grab is active.
To enable Secure Keyboard mode, hold the Ctrl key and press and hold mouse button
1 (generally the left mouse button, but this is configurable). A pop-up menu will
appear, as shown in Figure 5-1; the first option enables the Secure Keyboard mode.
Figure 5-1. The Secure Keyboard menu option in xterm
5.7
92 Chapter 5: Using the X Server
While Secure Keyboard mode is active, you won??™t be able to type into any other window,
regardless of focus. The menu option acts like a toggle; select it again to release
the keyboard grab.
Another problem with keyboard and mouse grabs is that a buggy or malicious client
application can hang after grabbing these resources, thus making it impossible to end
the grab or use other clients. X provides an escape hatch so you don??™t have to kill the
X server. You can configure the X.org server to provide a key combination that
releases keyboard and mouse grabs, and another key combination that kills the client
performing a keyboard or mouse grab. To enable this feature, add these entries to
your X server configuration file??™s ServerFlags or ServerLayout section:
Option "AllowDeactivateGrabs"
Option "AllowClosedownGrabs"
Option "HandleSpecialKeys" "Always"
AllowDeactivateGrabs enables the Ctrl-Alt-Keypad Divide key combination, which
releases all keyboard and mouse grabs.
Pages:
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168