You are here

protected function KeyboardTrait::keyEventModifierControl in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/jcalderonzumba/mink-phantomjs-driver/src/KeyboardTrait.php \Zumba\Mink\Driver\KeyboardTrait::keyEventModifierControl()

Does some control and normalization for the key event modifier

Parameters

$modifier:

Return value

string

Throws

DriverException

3 calls to KeyboardTrait::keyEventModifierControl()
KeyboardTrait::keyDown in vendor/jcalderonzumba/mink-phantomjs-driver/src/KeyboardTrait.php
Send a key-down event to the browser element
KeyboardTrait::keyPress in vendor/jcalderonzumba/mink-phantomjs-driver/src/KeyboardTrait.php
KeyboardTrait::keyUp in vendor/jcalderonzumba/mink-phantomjs-driver/src/KeyboardTrait.php
Pressed up specific keyboard key.

File

vendor/jcalderonzumba/mink-phantomjs-driver/src/KeyboardTrait.php, line 41

Class

KeyboardTrait
Class KeyboardTrait @package Zumba\Mink\Driver

Namespace

Zumba\Mink\Driver

Code

protected function keyEventModifierControl($modifier) {
  if ($modifier === null) {
    $modifier = "none";
  }
  if (!in_array($modifier, array(
    "none",
    "alt",
    "ctrl",
    "shift",
    "meta",
  ))) {
    throw new DriverException("Unsupported key modifier {$modifier}");
  }
  return $modifier;
}