diff --git a/doc/tools/keys2doc b/doc/tools/keys2doc index 5e95eebc5..cc9ed9b41 100755 --- a/doc/tools/keys2doc +++ b/doc/tools/keys2doc @@ -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/") action=$(grep " $action," "$CONFIGDIR/actions-$keymap.inc" \ | sed "s/.*\"\([^\"]*\)\".*N__(\"\(.*\)\").*/\2 ('\1')/") @@ -96,10 +95,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[]'