I am creating a global key hook program, and I want to abstract my key processing. So I would want a function to convert platform keycode into Qt key code. For example, convert Windows virtual key into Qt key. For example: int convertToQtKey(int virtualKey)

Calling convertToQtKey(27) should return Qt::Key_Escape.

I googled and also searched Qt Assistant but found nothing.

Thanks.