feat: Add support for action modifier keys like ctrl,shift,alt.
This commit is contained in:
@@ -400,6 +400,19 @@ ipc_demo() {
|
||||
ITEMS
|
||||
}
|
||||
|
||||
modifier_keys_demo() {
|
||||
echo "Modifier key demo. Use --structured to see modifiers in output." >&2
|
||||
echo "Press Enter normally, then try Shift+Enter or Ctrl+Enter." >&2
|
||||
echo "Compare the JSON output: modifiers only appear when held." >&2
|
||||
echo "" >&2
|
||||
cat <<'ITEMS' | pikl --structured
|
||||
{"label": "Firefox", "url": "https://firefox.com"}
|
||||
{"label": "Neovim", "url": "https://neovim.io"}
|
||||
{"label": "Alacritty", "url": "https://alacritty.org"}
|
||||
{"label": "mpv", "url": "https://mpv.io"}
|
||||
ITEMS
|
||||
}
|
||||
|
||||
session_demo() {
|
||||
echo "Session filter history: select with a filter, exit, relaunch." >&2
|
||||
echo "Press Ctrl+P to recall your previous filter." >&2
|
||||
@@ -442,6 +455,7 @@ scenarios=(
|
||||
"---"
|
||||
"IPC remote control"
|
||||
"Session filter history"
|
||||
"Modifier keys (structured output)"
|
||||
"---"
|
||||
"on-select-exec hook (legacy)"
|
||||
)
|
||||
@@ -475,6 +489,7 @@ run_scenario() {
|
||||
*"CSV + field"*) csv_filter ;;
|
||||
*"IPC remote"*) ipc_demo ;;
|
||||
*"Session filter"*) session_demo ;;
|
||||
*"Modifier keys"*) modifier_keys_demo ;;
|
||||
*"on-select-exec"*) on_select_hook ;;
|
||||
"---")
|
||||
echo "that's a separator, not a scenario" >&2
|
||||
|
||||
Reference in New Issue
Block a user