mirror of
https://github.com/0intro/wmii
synced 2025-02-12 20:34:39 +03:00
restore the old behavior of wmiimenu; Shift-Enter can be used to print the entered text instead of the selected item now.
This commit is contained in:
parent
43ee717835
commit
74a288bccd
@ -37,7 +37,10 @@ Tab (Control-i)
|
||||
copy the selected item to the input field.
|
||||
.TP 2
|
||||
Enter (Control-j)
|
||||
confirm selection and quit.
|
||||
confirm selection and quit (print the selected item to stdout).
|
||||
.TP 2
|
||||
Shift-Enter (Shift-Control-j)
|
||||
confirm selection and quit (print the text in the input field to stdout).
|
||||
.TP 2
|
||||
Escape (Control-[)
|
||||
quit without selecting an item.
|
||||
|
@ -239,10 +239,12 @@ handle_kpress(XKeyEvent * e)
|
||||
sel++;
|
||||
break;
|
||||
case XK_Return:
|
||||
if(text)
|
||||
if(e->state & ShiftMask)
|
||||
fprintf(stdout, "%s", text);
|
||||
else if(sel >= 0)
|
||||
fprintf(stdout, "%s", item.data[sel]);
|
||||
else if(text)
|
||||
fprintf(stdout, "%s", text);
|
||||
fflush(stdout);
|
||||
done = True;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user