postTool().setModPosition() in OnKeyboardEvent changes the text in the lineEdit of a newly created postTool, which you won't see since you don't show() the new widget. What you probably want to do is to call setText on OMD_post.

Try replacing the OnKeyBoardEvent module level function with a keyPressEvent function in the postTool, or maybe use a QShortCut.