WebPage: new constants for modifiers keys

Declares in event.modifiers all constants needed for the fifth
parameter of sendEvent.

http://code.google.com/p/phantomjs/issues/detail?id=1056
https://github.com/ariya/phantomjs/issues/11056
1.9
Laurent Jouanneau 2013-02-08 09:50:04 +01:00 committed by Ariya Hidayat
parent 63dc1e2c8f
commit b16a5348a9
1 changed files with 8 additions and 0 deletions

View File

@ -467,6 +467,14 @@ function decorateNewPage(opts, page) {
definePageCallbackHandler(page, handlers, "onPrompt", "_getJsPromptCallback");
page.event = {};
page.event.modifier = {
shift: 0x02000000,
ctrl: 0x04000000,
alt: 0x08000000,
meta: 0x10000000,
keypad: 0x20000000
};
page.event.key = {
'0': 48,
'1': 49,