I threw together a simple pyqt example of how to show a dialog at the current mouse position, and then respond to the ESC key being pressed to then hide that dialog:
https://gist.github.com/1951709 You can adapt this to your maya version I'm sure. But this is a standalone PyQt working example. I don't think its necessary to try and hook into any maya events with callbacks. You obviously know when you will be launching your dialog (to show at the mouse position), and while your dialog has focus it can watch for key press events. -- justin On Thu, Mar 1, 2012 at 8:37 AM, Chad Vernon <[email protected]> wrote: > You can probably use Qt to install some keyboard and mouse event filters. > > > On Thu, Mar 1, 2012 at 8:28 AM, wilsimar <[email protected]> wrote: > >> how to register one callback for maya keyboard and mouse events >> interception, in python api.. I need place my window widget on current >> mouse screen position, and close my window when ESC key pressed. Some tip?, >> site? or path to learning this???? I searched on old posts here and on >> google, but I'm out of luck. thanks. >> >> -- >> view archives: http://groups.google.com/group/python_inside_maya >> change your subscription settings: >> http://groups.google.com/group/python_inside_maya/subscribe >> > > -- > view archives: http://groups.google.com/group/python_inside_maya > change your subscription settings: > http://groups.google.com/group/python_inside_maya/subscribe > -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
