Skip to content
This repository has been archived by the owner on Jan 17, 2020. It is now read-only.

Commit

Permalink
Add missing keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Eibes committed May 16, 2018
1 parent 32e3d85 commit 15c13bb
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 5 deletions.
67 changes: 65 additions & 2 deletions src/Selenium/Key.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,71 @@

var k = require("selenium-webdriver").Key;

exports.altKey = k.ALT;
exports.controlKey = k.CONTROL;
exports.nullKey = k.NULL;
exports.cancelKey = k.CANCEL;
exports.helpKey = k.HELP;
exports.back_spaceKey = k.BACK_SPACE;
exports.tabKey = k.TAB;
exports.clearKey = k.CLEAR;
exports.returnKey = k.RETURN;
exports.enterKey = k.ENTER;
exports.shiftKey = k.SHIFT;
exports.controlKey = k.CONTROL;
exports.altKey = k.ALT;
exports.pauseKey = k.PAUSE;
exports.escapeKey = k.ESCAPE;
exports.spaceKey = k.SPACE;
exports.pageUpKey = k.PAGE_UP;
exports.pageDownKey = k.PAGE_DOWN;
exports.endKey = k.END;
exports.homeKey = k.HOME;
exports.arrowLeftKey = k.ARROW_LEFT;
exports.leftKey = k.LEFT;
exports.arrowUpKey = k.ARROW_UP;
exports.upKey = k.UP;
exports.arrow_rightKey = k.ARROW_RIGHT;
exports.rightKey = k.RIGHT;
exports.arrowDownKey = k.ARROW_DOWN;
exports.downKey = k.DOWN;

exports.insertKey = k.INSERT;
exports.deleteKey = k.DELETE;
exports.semicolonKey = k.SEMICOLON;
exports.equalsKey = k.EQUALS;

exports.numpad0Key = k.NUMPAD0;
exports.numpad1Key = k.NUMPAD1;
exports.numpad2Key = k.NUMPAD2;
exports.numpad3Key = k.NUMPAD3;
exports.numpad4Key = k.NUMPAD4;
exports.numpad5Key = k.NUMPAD5;
exports.numpad6Key = k.NUMPAD6;
exports.numpad7Key = k.NUMPAD7;
exports.numpad8Key = k.NUMPAD8;
exports.numpad9Key = k.NUMPAD9;

exports.multiplyKey = k.MULTIPLY;
exports.addKey = k.ADD;
exports.separatorKey = k.SEPARATOR;
exports.subtractKey = k.SUBTRACT;
exports.decimalKey = k.DECIMAL;
exports.divideKey = k.DIVIDE;

exports.f1Key = k.F1;
exports.f2Key = k.F2;
exports.f3Key = k.F3;
exports.f4Key = k.F4;
exports.f5Key = k.F5;
exports.f6Key = k.F6;
exports.f7Key = k.F7;
exports.f8Key = k.F8;
exports.f9Key = k.F9;
exports.f10Key = k.F10;
exports.f11Key = k.F11;
exports.f12Key = k.F12;

exports.commandKey = k.COMMAND;
exports.metaKey = k.META;

exports.zenkakuHanakuKey = k.ZENKAKU_HANAKU;

68 changes: 65 additions & 3 deletions src/Selenium/Key.purs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,71 @@ module Selenium.Key where

import Selenium.Types

-- TODO: port all `Key` enum
foreign import altKey ControlKey
foreign import controlKey ControlKey
foreign import nullKey ControlKey
foreign import cancelKey ControlKey
foreign import helpKey ControlKey
foreign import back_spaceKey ControlKey
foreign import tabKey ControlKey
foreign import clearKey ControlKey
foreign import returnKey ControlKey
foreign import enterKey ControlKey
foreign import shiftKey ControlKey
foreign import controlKey ControlKey
foreign import altKey ControlKey
foreign import pauseKey ControlKey
foreign import escapeKey ControlKey
foreign import spaceKey ControlKey
foreign import pageUpKey ControlKey
foreign import pageDownKey ControlKey
foreign import endKey ControlKey
foreign import homeKey ControlKey
foreign import arrowLeftKey ControlKey
foreign import leftKey ControlKey
foreign import arrowUpKey ControlKey
foreign import upKey ControlKey
foreign import arrow_rightKey ControlKey
foreign import rightKey ControlKey
foreign import arrowDownKey ControlKey
foreign import downKey ControlKey

foreign import insertKey ControlKey
foreign import deleteKey ControlKey
foreign import semicolonKey ControlKey
foreign import equalsKey ControlKey

foreign import numpad0Key ControlKey
foreign import numpad1Key ControlKey
foreign import numpad2Key ControlKey
foreign import numpad3Key ControlKey
foreign import numpad4Key ControlKey
foreign import numpad5Key ControlKey
foreign import numpad6Key ControlKey
foreign import numpad7Key ControlKey
foreign import numpad8Key ControlKey
foreign import numpad9Key ControlKey

foreign import multiplyKey ControlKey
foreign import addKey ControlKey
foreign import separatorKey ControlKey
foreign import subtractKey ControlKey
foreign import decimalKey ControlKey
foreign import divideKey ControlKey

foreign import f1Key ControlKey
foreign import f2Key ControlKey
foreign import f3Key ControlKey
foreign import f4Key ControlKey
foreign import f5Key ControlKey
foreign import f6Key ControlKey
foreign import f7Key ControlKey
foreign import f8Key ControlKey
foreign import f9Key ControlKey
foreign import f10Key ControlKey
foreign import f11Key ControlKey
foreign import f12Key ControlKey

foreign import commandKey ControlKey
foreign import metaKey ControlKey

foreign import zenkakuHanakuKey ControlKey

0 comments on commit 15c13bb

Please sign in to comment.