[keys] Update keys in onafterevent.
[keys] Add partial key support
[keys] Move showKeys() and showPartialKeys() into onafterevent().