Link Search Menu Expand Document

tooltip.key

description

Makes it possible to validate the tooltip by pressing a key. You can either pass a string of keys, or pass the keycode of a specific key (e.g. 13 for enter/return). If you pass a non-null second parameter (e.g. “no click”) then clicks will have no effect for validation, and if you have not specified a text for the validation button when creating the tooltip, no such button will be displayed at its bottom-right corner.

syntax

getTooltip(ELEMENT_NAME).key(keys)
  • keys :

alternate(s)

  • getTooltip(ELEMENT_NAME).key("keys", "no click")

  • getTooltip(ELEMENT_NAME).key(keycode)

  • getTooltip(ELEMENT_NAME).key(keycode, "no click")

notes

  • Adds an image to the page and places a box with the text Press enter/return when you are done admiring this beautiful square to its bottom-right corner, containing no validation button. The tooltip will disappear only when the enter/return key (whose keycode is 13) is pressed.

example(s)


@newImage("myImage", "square.png")
@    .print()
@,
@newTooltip("myTooltip", "Press enter/return when you are done admiring this beautiful square")
$    .key(13, "no click")
@    .print( getImage("myImage") )
@    .wait()
  • Adds an image to the page and places a box with the text Press enter/return when you are done admiring this beautiful square to its bottom-right corner, containing no validation button. The tooltip will disappear only when the enter/return key (whose keycode is 13) is pressed.