From 1f16ed1ee69a9bc1a78d2af746e508ef16c44b6c Mon Sep 17 00:00:00 2001 From: Becky Gilbert Date: Tue, 2 Feb 2021 16:14:30 -0800 Subject: [PATCH] remove keyCode-related functions from pluginAPI docs #396 --- docs/core_library/jspsych-pluginAPI.md | 94 -------------------------- 1 file changed, 94 deletions(-) diff --git a/docs/core_library/jspsych-pluginAPI.md b/docs/core_library/jspsych-pluginAPI.md index 07aae6e9..20b0c718 100644 --- a/docs/core_library/jspsych-pluginAPI.md +++ b/docs/core_library/jspsych-pluginAPI.md @@ -117,100 +117,6 @@ Returns nothing. Clears any pending timeouts that were set using jsPsych.pluginAPI.setTimeout() ---- -## jsPsych.pluginAPI.compareKeys - -``` -jsPsych.pluginAPI.compareKeys(key1, key2) -``` - -### Parameters - -Parameter | Type | Description -----------|------|------------ -key1 | string or numeric | The representation of a key, either string or keycode -key2 | string or numeric | The representation of a key, either string or keycode - -### Return value - -Returns true if keycodes or strings refer to the same key, regardless of type. - -### Description - -Compares two keys to see if they are the same, ignoring differences in representational type. - -### Examples - -```javascript -jsPsych.pluginAPI.compareKeys('a', 65); -// returns true - -jsPsych.pluginAPI.compareKeys('space', 31) -// returns false -``` - ---- -## jsPsych.pluginAPI.convertKeyCharacterToKeyCode - -``` -jsPsych.pluginAPI.convertKeyCharacterToKeyCode(character) -``` - -### Parameters - -Parameter | Type | Description -----------|------|------------ -character | string | The string representation of keyboard key. - -### Return value - -Returns the numeric keycode associated with the `character` parameter. - -### Description - -Converts between the string representation of a key and the numeric key code associated with that key. - -### Examples - -```javascript -var keycode = jsPsych.pluginAPI.convertKeyCharacterToKeyCode('a') -// keycode is 65 - -keycode = jsPsych.pluginAPI.convertKeyCharacterToKeyCode('space') -// keycode is 32 -``` - ---- -## jsPsych.pluginAPI.convertKeyCodeToKeyCharacter - -``` -jsPsych.pluginAPI.convertKeyCodeToKeyCharacter(character) -``` - -### Parameters - -Parameter | Type | Description -----------|------|------------ -code | numeric | The numeric representation of keyboard key. - -### Return value - -Returns the string representation of the key associated with the `code` parameter. - -### Description - -Converts between the numeric key code of a key and the string representation associated with that key. - -### Examples - -```javascript -var keycode = jsPsych.pluginAPI.convertKeyCharacterToKeyCode(65) -// key is 'a' - -keycode = jsPsych.pluginAPI.convertKeyCharacterToKeyCode(32) -// keycode is 'space' -``` - --- ## jsPsych.pluginAPI.getAudioBuffer