mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
keys2doc: map the KBD_MOD_SHIFT modifier to Shift-prefix
This commit is contained in:
parent
3ea7939b0d
commit
dc497964e9
@ -74,9 +74,8 @@ print_keymap_defaults()
|
|||||||
grep ACT_$KEYMAP $KBDBIND | grep '^[[:space:]]{' | grep -v '{ "' \
|
grep ACT_$KEYMAP $KBDBIND | grep '^[[:space:]]{' | grep -v '{ "' \
|
||||||
| while read entry
|
| while read entry
|
||||||
do
|
do
|
||||||
entry=$(echo "$entry" | sed 's/.*{ { //' | sed 's/ }//')
|
entry=$(echo "$entry" | sed 's/.*{ { //')
|
||||||
key=$(echo "$entry" | sed "s/\(KBD_[^,]*\|'.*'\),.*/\1/")
|
key=$(echo "$entry" | sed "s/\(KBD_[^,]*\|'.*'\),.*/\1/")
|
||||||
modifier=$(echo "$entry" | sed "s/.*KBD_MOD_\([A-Z_]*\).*/\1/")
|
|
||||||
action=$(echo "$entry" | sed "s/.*,.*\(ACT_$KEYMAP\)_\([A-Z_]*\).*/\2/")
|
action=$(echo "$entry" | sed "s/.*,.*\(ACT_$KEYMAP\)_\([A-Z_]*\).*/\2/")
|
||||||
action=$(grep " $action," "$CONFIGDIR/actions-$keymap.inc" \
|
action=$(grep " $action," "$CONFIGDIR/actions-$keymap.inc" \
|
||||||
| sed "s/.*\"\([^\"]*\)\".*N__(\"\(.*\)\").*/\2 ('\1')/")
|
| sed "s/.*\"\([^\"]*\)\".*N__(\"\(.*\)\").*/\2 ('\1')/")
|
||||||
@ -96,9 +95,10 @@ print_keymap_defaults()
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$modifier" in
|
case "$entry" in
|
||||||
ALT) modifier="Alt-" ;;
|
*KBD_MOD_ALT*) modifier="Alt-" ;;
|
||||||
CTRL) modifier="Ctrl-" ;;
|
*KBD_MOD_CTRL*) modifier="Ctrl-" ;;
|
||||||
|
*KBD_MOD_SHIFT*) modifier="Shift-" ;;
|
||||||
*) modifier="" ;;
|
*) modifier="" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user