Fix two issues of user key map for extension commands.

This fixes #9954 and #9953.
Done.