Fix two issues of user key map for extension commands.

This fixes #9954 and #9953.
Thanks. I'll fix it soon.