mirror of
https://github.com/0intro/wmii
synced 2025-02-13 04:44:30 +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.
|
copy the selected item to the input field.
|
||||||
.TP 2
|
.TP 2
|
||||||
Enter (Control-j)
|
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
|
.TP 2
|
||||||
Escape (Control-[)
|
Escape (Control-[)
|
||||||
quit without selecting an item.
|
quit without selecting an item.
|
||||||
|
@ -239,10 +239,12 @@ handle_kpress(XKeyEvent * e)
|
|||||||
sel++;
|
sel++;
|
||||||
break;
|
break;
|
||||||
case XK_Return:
|
case XK_Return:
|
||||||
if(text)
|
if(e->state & ShiftMask)
|
||||||
fprintf(stdout, "%s", text);
|
fprintf(stdout, "%s", text);
|
||||||
else if(sel >= 0)
|
else if(sel >= 0)
|
||||||
fprintf(stdout, "%s", item.data[sel]);
|
fprintf(stdout, "%s", item.data[sel]);
|
||||||
|
else if(text)
|
||||||
|
fprintf(stdout, "%s", text);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
done = True;
|
done = True;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user