about summary refs log tree commit diff stats
path: root/docs/controls/keyboard.html
blob: 0008a9e9d6e71ebd8b43d77cc646b4e24f1059dc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<html>
	<button onclick="history.back()">Back</button>
	<br>
	<h1>Keyboard</h1>
	<hr>
	<ul>
		<li>
			Singleplayer
			<br>
			Up and Down controls the paddle, ESC pauses the game, Arrow Keys controls the menus such as the title screen and pause screen, and SPACE selects a menu item.
		</li>
		<li>
			Multiplayer
			<br>
			W and S controls the 1st player paddle, Up and Down control the 2nd player paddle, and the rest is the same as singleplayer.
		</li>
	</ul>
</html>
ocz(unsigned int size) { void *res = calloc(1, size); if(!res) eprint("fatal: could not malloc() %u bytes\n", size); return res; } void eprint(const char *errstr, ...) { va_list ap; va_start(ap, errstr); vfprintf(stderr, errstr, ap); va_end(ap); exit(EXIT_FAILURE); } void * erealloc(void *ptr, unsigned int size) { void *res = realloc(ptr, size); if(!res) eprint("fatal: could not malloc() %u bytes\n", size); return res; } void spawn(Arg *arg) { static char *shell = NULL; if(!shell && !(shell = getenv("SHELL"))) shell = "/bin/sh"; if(!arg->cmd) return; /* The double-fork construct avoids zombie processes and keeps the code * clean from stupid signal handlers. */ if(fork() == 0) { if(fork() == 0) { if(dpy) close(ConnectionNumber(dpy)); setsid(); execl(shell, shell, "-c", arg->cmd, (char *)NULL); fprintf(stderr, "dwm: execl '%s -c %s'", shell, arg->cmd); perror(" failed"); } exit(0); } wait(0); }