|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgnu.app.Application
gnu.x11.Application
gnu.app.puppet.Puppet
public class Puppet
Window manager.
In my PC 104 keyboard system,
META (MOD1) = "alt" next to spacebar ALT (MOD4) = "window" next to meta SUPER (MOD3) = "menu" next to right CONTROLPlease see Xmodmap.
KEY SEQUENCE | COMMAND | |
---|---|---|
basic | ||
[enter] | finish | |
[kp-enter] | finish | |
[escape] | finish or abort-switch-focus | |
[(control delete) (meta DIGIT)] | lanuch-command DIGIT | |
[(control delete) S] | *search-window-backward | |
[(control delete) s] | *search-window-forward | |
focus | ||
[(meta tab)] | switch-focus-ignore-class-forward | |
[(shift meta tab)] | switch-focus-ignore-class-backward | |
[(alt tab)] | switch-focus-same-class-forward | |
[(shift alt tab)] | switch-focus-same-class-backward | |
[(super tab)] | switch-focus-different-class-forward | |
[(super tab)] | switch-focus-different-class-backward | |
window | ||
[(control delete) ARROW] | *move | |
[(control delete) (shift ARROW)] | *move faster | |
[(control delete) (control ARROW)] | *resize | |
[(control delete) (control ARROW)] | *resize faster | |
[(control delete) pageup] | raise | |
[(control delete) page-down] | lower | |
[(control delete) d] | !dump-info | |
[(control delete) f] | toggle-focus | |
[(control delete) F] | grant-all-focus | |
[(control delete) h] | !hide-which | |
[(control delete) H] | !unhide-which | |
[(control delete) m] | minimize | |
[(control delete) M] | !maximize | |
[(control delete) r] | restore-size | |
[(control delete) R] | save-size | |
[(control delete) w] | !warp-pointer | |
[(control delete) z] | *relocate | |
register | ||
[(control delete) space KEY] | client-to-register KEY | |
[(control delete) j KEY] | jump-to-register KEY | |
[(control delete) (control DIGIT)] | jump-to-register DIGIT | |
critical | ||
[(control delete) backspace d] | delete-window | |
[(control delete) backspace k] | kill-window | |
[(control delete) backspace Q] | quit-puppet | |
geometry | ||
[(control delete) g ARROW] | *gravitate | |
[(control delete) g (shift ARROW)] | *gravitate-absolute | |
[(control delete) g ?2] | *scale-two-third | |
[(control delete) g ?3] | *scale-one-and-half | |
[(control delete) g ?d] | *scale-double | |
[(control delete) g ?h] | *scale-half | |
mouse | ||
[(meta BUTTON) on root] | lanuch-on-root | |
[BUTTON on root] | pointer-root-focus | |
[(control button1)] | focus-with-raise | |
[(control button2)] | focus-without-raise | |
[(control button3)] | lower-behind | |
[(control meta button1)] | delete-window | |
[(control meta button3)] | kill-window | |
mouse key | ||
[(control delete) KP_ARROW] | *move-pointer | |
[(control delete) (shift KP_ARROW)] | *move-pointer faster | |
[(control delete) (control shift KP_ARROW)] | *move-pointer even faster | |
[(control delete) kp-begin] | click-button1 | |
[(control delete) (shift kp-begin)] | double-click-button1 | |
[(control delete) kp-divide] | click-button1 | |
[(control delete) (shift kp-divide)] | double-click-button2 | |
[(control delete) kp-multiply] | click-button1 | |
[(control delete) (shift kp-multiply)] | double-click-button3 | |
Note, however, there is no visual feedback for persistent commands. Users may feel their keyboards are locked, while actually this window manager is expecting more keystrokes. Remember to press `finish' key to finish a persistent command.
COMMAND | ARGUMENT | DESCRIPTION |
---|---|---|
dump-info | nothing | dump-basic-info |
negative | dump-hidden-windows | |
other | dump-all-windows | |
hide-which | nothing | hide-focus |
negative | hide-others | |
other | hide-same-class | |
unhide-which | nothing | undo-hide |
negative | unhide-all | |
other | unhide-same-class | |
maximize | nothing | maximize-user-space |
other | maximize-full-screen |
gnu/app/puppet/Preference.java
and key_process_*()
in
gnu/app/puppet/Puppet.java
.
NORMAL
which is the
default state for freshly mapped windows. Windows that are hidden or
denied focus by user, or unmapped by application are not considered
normal.
Class-based switch-focus ([(alt tab)] and [(super tab)]): they are exactly the same as [(meta tab)] counterparts, except that the selection criteria are WM-CLASS sensitive. WM-CLASS is an classification of applications defined in icccm 4.1.2.5. While [(alt tab)] considers all normal windows, WINDOW-TAB considers normal windows that are of the same WM_CLASS as the window under current focus; and [(super tab)] considers those of different WM_CLASS. Note pressing SHIFT will reverse the direction.
Find Window (`search-window-forward' and `search-window-backward'): you can search and focus a window by pressing its first character of its WM-CLASS string. To go to next matching window, press the same character again, for as many times as you want. Press [enter] or [escape] when done (as it is a persistent command). To search among all managed windows (including normal, hidden and focus-denied windows), hold SHIFT while pressing the character, that is, press its corresponding capital letter.
Register (`client-to-register' and `jump-to-register') (similar to Emacs buffer register): you can store a window to a register, and then later restore the focus to that window in the register. A register is any key (including control, alt, shift....!) on the keyboard. `client-to-register stores a window to a register, while `jump-to-register' later will unhide and raise (if necessary) the window in the register, and then give it the input focus.
Fall-back: this policy decides which window to focus if the current window is being hidden, unmapped, or denied focus. Unlike Microsoft Windows (tm) which unhelpfully gives the focus back to nowhere, focus will be fallen back to the most recently used normal window (as if [(meta tab)] is pressed).
Intercepting button press events is discouraged (prohibited?) in icccm, but there is not much choice as we don't do re-parenting.
Supposedly, X server comes with XKB extension that supports MouseKey as a built-in feature. However, personally I find it inconvenient to use (num-lock for on/off and default click keys) and not highly customizable (acceleration time and delay). Moreover, there is a serious bug in reference implementations of X server as pointed out by Stephen Montgomery-Smith (stephen@math.missouri.edu) here. He also wrote some customization tool ( Xkkset) for many XKB features. In the meantime, Puppet supports its own mouse key binding as a supplementary mechanism.
Field Summary | |
---|---|
boolean |
alt_down
|
int |
argument
|
boolean |
argument_negative
|
boolean |
argument_present
|
java.util.Vector |
clients
A list of all managed children of root window, that is, our clients. |
boolean |
control_down
|
static int |
DELTA_LARGE
|
static int |
DELTA_SMALL
|
Client |
focus
|
Client |
focus_base
The active window when FOCUS-KEY (ALT-TAB, WINDOW-TAB, or MENU-TAB) is pressed. |
boolean |
focus_key_pressed
|
java.util.Vector |
focus_so_far
|
static int |
HIDDEN
|
int |
keycode
|
int |
keysym
|
Client |
last_hide
|
boolean |
meta_down
|
static int |
NO_FOCUS
|
static int |
NORMAL
|
Preference |
pref
|
int |
prefix0
|
int |
prefix1
|
boolean |
print_event
|
static java.util.Random |
random
|
Client[] |
registers
see Focus Policy - Keyboard. |
Window |
root
|
boolean |
shift_down
|
Rectangle |
space
|
boolean |
super_down
|
static int |
SWITCH_KEYSYM
|
boolean |
system_key_pressed
|
static int |
SYSTEM_KEYSYM
|
static int |
SYSTEM_MODIFIER
|
static int |
UNMANAGED
|
XTest |
xtest
|
Fields inherited from class gnu.x11.Application |
---|
display |
Constructor Summary | |
---|---|
Puppet(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SYSTEM_MODIFIER
public static final int SYSTEM_KEYSYM
public static final int SWITCH_KEYSYM
public static final int UNMANAGED
public static final int NORMAL
public static final int HIDDEN
public static final int NO_FOCUS
public static final int DELTA_LARGE
public static final int DELTA_SMALL
public Client[] registers
public java.util.Vector clients
scan_children()
public Client focus_base
next_client(Client, boolean)
public java.util.Vector focus_so_far
public Preference pref
public Rectangle space
public Window root
public Client focus
public Client last_hide
public XTest xtest
public boolean print_event
public boolean system_key_pressed
public boolean focus_key_pressed
public static final java.util.Random random
public int keycode
public int keysym
public boolean alt_down
public boolean control_down
public boolean meta_down
public boolean shift_down
public boolean super_down
public int prefix0
public int prefix1
public int argument
public boolean argument_present
public boolean argument_negative
Constructor Detail |
---|
public Puppet(java.lang.String[] args) throws NotFoundException
NotFoundException
Method Detail |
---|
public void alert_user(java.lang.String message)
public void client_to_register(Client client, int keycode)
public void control_root_window()
public void deny_focus(Client client)
public void focus_client_first_char(Client client, boolean reverse, char c, boolean all)
public void give_up_focus(Client client)
public void grab_keybut()
public void grant_all_focus()
public void grant_focus(Client client)
public boolean grant_preference(Client client)
public void hide(Client client)
public void hide_others(Client client)
public void hide_same_class(Client client)
public void jump_to_register(int keycode)
public boolean key_do_change_geometry()
public boolean key_do_critical_operation()
public boolean key_do_jump_lanuch_or_argument()
public void key_dump_info()
public void key_hide_which()
public void key_unhide_which()
public void key_move_or_resize(int x_direction, int y_direction)
public void key_move_pointer(int x_direction, int y_direction)
public boolean key_process()
public boolean key_process_no_prefix()
public boolean key_process_prefix0()
public boolean key_process_prefix1()
public void key_click_button(int button)
public void key_search_client()
public void key_switch_focus()
public void key_warp_pointer()
public void manage(Client client)
public void maximize(Client client, boolean full_screen)
public void minimize(Client client)
public Client next_client(Client from, boolean reverse)
public Client next_client_normal(Client from, boolean reverse)
next_client(Client, boolean)
public Client next_client_same_class(Client from, boolean reverse)
next_client(Client, boolean)
public Client next_client_different_class(Client from, boolean reverse)
next_client(Client, boolean)
public Client next_client_first_char(Client from, boolean reverse, char c, boolean all)
next_client(Client, boolean)
public void when(Event event)
public void read_and_dispatch_event()
public void register_fall_back(Client client)
public void relocate(Client client)
public void restore_size(Client client)
public void save_size(Client client)
public void scale_size(Client client, double factor)
public void scan_children()
public void set_focus(Client client, boolean warp_pointer)
public void when_button_press(ButtonPress event)
public void when_client_message(ClientMessage event)
public void when_configure_request(ConfigureRequest event)
public void when_destroy_notify(DestroyNotify event)
public void when_key_press(KeyPress event)
public void when_key_release(KeyRelease event)
public void when_property_notify(PropertyNotify event)
public void when_map_request(MapRequest event)
public void when_map_notify(MapNotify event)
public void when_quit()
public void when_unmap_notify(UnmapNotify event)
public void toggle_focus(Client client)
public void unhide(Client client)
public void unhide_all()
public void unhide_same_class(Client client)
public void update_client_order(Client client)
public static void main(java.lang.String[] args) throws NotFoundException
NotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |