1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

keys2doc: map the KBD_MOD_SHIFT modifier to Shift-prefix

(cherry picked from commit dc497964e9)
This commit is contained in:
Jonas Fonseca 2008-03-03 01:38:54 +01:00 committed by Kalle Olavi Niemitalo
parent b0251dad32
commit 9863dbfa9c

View File

@ -74,9 +74,8 @@ print_keymap_defaults()
grep ACT_$KEYMAP $KBDBIND | grep '^[[:space:]]{' | grep -v '{ "' \
| while read entry
do
entry=$(echo "$entry" | sed 's/.*{ { //' | sed 's/ }//')
entry=$(echo "$entry" | sed 's/.*{ { //')
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/")
# If there are backslashed quotes, remove the backslashes.
# (This is not needed in print_keymap_actions because
@ -99,10 +98,11 @@ print_keymap_defaults()
;;
esac
case "$modifier" in
ALT) modifier="Alt-" ;;
CTRL) modifier="Ctrl-" ;;
*) modifier="" ;;
case "$entry" in
*KBD_MOD_ALT*) modifier="Alt-" ;;
*KBD_MOD_CTRL*) modifier="Ctrl-" ;;
*KBD_MOD_SHIFT*) modifier="Shift-" ;;
*) modifier="" ;;
esac
echo 'ifdef::backend-docbook[]'