diff -r 332dea2f6a10 dmenu.1 --- a/dmenu.1 Fri Dec 08 11:12:11 2006 +0100 +++ dmenu.1 Mon Dec 11 22:16:38 2006 +0100 @@ -40,7 +40,7 @@ prints version information to standard o prints version information to standard output, then exits. .SH USAGE dmenu reads a list of newline-separated items from standard input and creates a -menu. When the user selects an item or enters any text and presses Return, his +menu. When the user selects an item or enters any text and presses Return, his/her choice is printed to standard output and dmenu terminates. .P dmenu is completely controlled by the keyboard. The following keys are recognized: @@ -51,6 +51,12 @@ only items containing this text will be .TP .B Left/Right Select the previous/next item. +.TP +.B PageUp/PageDown +Select the first item of the previous/next 'page' of items. +.TP +.B Home/End +Select the first/last item. .TP .B Tab Copy the selected item to the input field. diff -r 332dea2f6a10 main.c --- a/main.c Fri Dec 08 11:12:11 2006 +0100 +++ main.c Mon Dec 11 22:07:07 2006 +0100 @@ -217,6 +217,30 @@ kpress(XKeyEvent * e) { } while(i && nitem && prev_nitem == nitem); match(text); } + break; + case XK_Prior: + if(prev) { + sel = curr = prev; + calcoffsets(); + } + break; + case XK_Next: + if(next) { + sel = curr = next; + calcoffsets(); + } + break; + case XK_Home: + sel = curr = item; + calcoffsets(); + break; + case XK_End: + while(next) { + sel = curr = next; + calcoffsets(); + } + while(sel->right) + sel = sel->right; break; default: if(num && !iscntrl((int) buf[0])) {