mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
keys2doc: map the KBD_MOD_SHIFT modifier to Shift-prefix
(cherry picked from commit dc497964e9
)
This commit is contained in:
parent
b0251dad32
commit
9863dbfa9c
@ -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/")
|
||||||
# If there are backslashed quotes, remove the backslashes.
|
# If there are backslashed quotes, remove the backslashes.
|
||||||
# (This is not needed in print_keymap_actions because
|
# (This is not needed in print_keymap_actions because
|
||||||
@ -99,10 +98,11 @@ 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-" ;;
|
||||||
*) modifier="" ;;
|
*KBD_MOD_SHIFT*) modifier="Shift-" ;;
|
||||||
|
*) modifier="" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo 'ifdef::backend-docbook[]'
|
echo 'ifdef::backend-docbook[]'
|
||||||
|
Loading…
Reference in New Issue
Block a user