From b16a5348a9ecb08169d493a5aa1543b05962dabb Mon Sep 17 00:00:00 2001 From: Laurent Jouanneau Date: Fri, 8 Feb 2013 09:50:04 +0100 Subject: [PATCH] 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 --- src/modules/webpage.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/modules/webpage.js b/src/modules/webpage.js index 74b58077..2326340f 100644 --- a/src/modules/webpage.js +++ b/src/modules/webpage.js @@ -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,