I don't know PyQt either, but you can try this (it's C++ but you should be able to read it) - and if it's working you can alter the code line by line (and post a reply, what the reason was):
// Use a common key
pAction->setShortcut( Qt::Key_Escape );
// If using the Qt::WindowShortcut, you don't have to take care of the focus - just any element of the window must be focused
pAction->setShortcutContext( Qt::WindowShortcut );
connect( pAction, SIGNAL(triggered()),
this, SLOT(SL_DoSomething()) );
addAction( pAction );
setContextMenuPolicy( Qt::ActionsContextMenu );
QAction* pAction = new QAction( "text4ESC", this );
// Use a common key
pAction->setShortcut( Qt::Key_Escape );
// If using the Qt::WindowShortcut, you don't have to take care of the focus - just any element of the window must be focused
pAction->setShortcutContext( Qt::WindowShortcut );
connect( pAction, SIGNAL(triggered()),
this, SLOT(SL_DoSomething()) );
addAction( pAction );
setContextMenuPolicy( Qt::ActionsContextMenu );
To copy to clipboard, switch view to plain text mode
Bookmarks