devdraw.1 (2531B)
1 .TH DEVDRAW 1 2 .SH NAME 3 devdraw \- draw device simulator 4 .SH SYNOPSIS 5 invoked via 6 .I initdraw 7 (see 8 .MR graphics (3) ) 9 .SH DESCRIPTION 10 .I Devdraw 11 serves a custom graphics protocol and is the only program 12 that talks directly to X window servers. 13 .PP 14 .SS "Apple macOS 15 .PP 16 On macOS, because a laptop trackpad click only has one button (the trackpad itself) 17 Option-click is button 2, and Command-click is button 3. 18 While the main mouse button is held down, 19 Control, Option, and Command serve as simulated buttons 1, 2, 3 for chording in 20 .MR acme (4) . 21 For example, the 1-3 pasting chord in acme can be executed by 22 highlighting text while holding down the trackpad button 23 and then, while still holding down the button, pressing the Command key. 24 .PP 25 As usual, buttons 4 and 5 represent a scroll wheel. 26 Two-finger scrolling on the trackpad sends those button events. 27 .PP 28 Holding down shift while clicking adds 5 to the button number. 29 For example, Command-Click is button 3, so Command-Shift-Click is button 8. 30 Most programs do not respond to those buttons; one notable exception is 31 .MR acme (1) , 32 which interprets button 8 (shifted button 3) as a reverse search. 33 .PP 34 Typing Command-F toggles full screen mode. 35 .PP 36 .I Devdraw 37 automatically detects high-resolution (retina) displays. 38 For debugging, typing Command-R toggles retina mode. 39 .PP 40 Other than the special cases mentioned above, 41 holding down Command while typing a character 42 .B Kcmd 43 (0xF100) 44 plus that character. 45 Some programs (notably 46 .IR acme (1)) 47 recognize standard keyboard shortcuts such as 48 Command-Z (undo), Command-Shift-Z (redo), 49 Command-X (cut), and Command-V (paste). 50 .SS "X Windows 51 .PP 52 On Unix systems, Control-click is mouse button 2, 53 and Alt-click is mouse button 3. 54 While the main mouse button is held down, 55 Control and Alt serve as simulated buttons 2, 3 for chording in 56 .MR acme (4) . 57 For example, the 1-3 pasting chord in acme can be executed by 58 highlighting text while holding down the trackpad button 59 and then, while still holding down the button, pressing the Alt key. 60 .PP 61 Because the Control and Alt keys have other meanings 62 (see 63 .MR keyboard (7) 64 for the Alt key's meaning) 65 and there is no third modifier key like on the Mac, 66 there is no way to type 67 .B Kcmd 68 variants, 69 so there is no access to keyboard shortcuts for 70 undo, redo, cut, and paste. 71 .SH SOURCE 72 .B \*9/src/cmd/devdraw 73 .SH "SEE ALSO 74 .MR draw (3) , 75 .MR drawfcall (3) , 76 .MR graphics (3) , 77 .MR keyboard (7) 78 .SH BUGS 79 .I Devdraw 80 should probably present a standard 9P server 81 instead of using its own protocol.