addPreventDefaultFor() (since version 2.0.0)

Add keys that will have their default actions prevented.

Syntax addPreventDefaultFor(keys)

Return Type undefined

Description

Add keys that will have their default actions prevented. This can be useful for example in games, where you might want to use the space key without it causing the page to scroll.

Arguments

keys : Array or Number (since version 2.0.0)
Can be either a number or an array of numbers, representing the keycodes to prevent actions for. The helper properties for keycodes can be used here.

Return Value

undefined. Doesn't return anything.