├── .gitignore ├── .vscode ├── launch.json ├── settings.json ├── tasks.json └── tasks.json.old ├── .vscodeignore ├── LICENSE.txt ├── ThirdPartyNotices.txt ├── appveyor.yml ├── images └── icon.png ├── package.json ├── readme.md └── snippets.json /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | out/ 4 | npm-debug.log -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Run Extension", 6 | "type": "extensionHost", 7 | "request": "launch", 8 | "runtimeExecutable": "${execPath}", 9 | "args": [ 10 | "--extensionDevelopmentPath=${workspaceRoot}" 11 | ], 12 | "sourceMaps": true, 13 | "outDir": "${workspaceRoot}/out", 14 | "preLaunchTask": "npm" 15 | }, 16 | { 17 | "name": "Run Server", 18 | "type": "node", 19 | "request": "launch", 20 | "runtimeArgs": [ "--nolazy" ], 21 | "program": "${workspaceRoot}/src/mockDebug.ts", 22 | "stopOnEntry": false, 23 | "args": [ "--server=4711" ], 24 | "sourceMaps": true, 25 | "outDir": "${workspaceRoot}/out", 26 | "cwd": "${workspaceRoot}" 27 | }, 28 | { 29 | "name": "Run Tests", 30 | "type": "node", 31 | "request": "launch", 32 | "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", 33 | "runtimeArgs": [ "--nolazy" ], 34 | "args": [ 35 | "-u", "tdd", 36 | "--timeout", "999999", 37 | "--colors", 38 | "./out/tests/" 39 | ], 40 | "sourceMaps": true, 41 | "outDir": "${workspaceRoot}/out", 42 | "cwd": "${workspaceRoot}", 43 | "internalConsoleOptions": "openOnSessionStart" 44 | }, 45 | { 46 | "name": "Run Mock Sample", 47 | "type": "mock", 48 | "request": "launch", 49 | "program": "${workspaceRoot}/${command.AskForProgramName}", 50 | "stopOnEntry": true 51 | } 52 | ] 53 | } 54 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings.FALSE 2 | { 3 | "javascript.validate.enable": false, 4 | "typescript.tsdk": "node_modules/typescript/lib", 5 | "files.trimTrailingWhitespace": true, 6 | "eslint.enable": false, 7 | "editor.insertSpaces": false 8 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "command": "npm", 4 | "isWatching": true, 5 | "args": [ 6 | "run", "watch" 7 | ], 8 | "problemMatcher": "$tsc-watch", 9 | "tasks": [ 10 | { 11 | "label": "npm", 12 | "type": "shell", 13 | "command": "npm", 14 | "args": [ 15 | "run", 16 | "watch" 17 | ], 18 | "isBackground": true, 19 | "problemMatcher": "$tsc-watch", 20 | "group": "build" 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /.vscode/tasks.json.old: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.1.0", 3 | "command": "npm", 4 | "isShellCommand": true, 5 | "isWatching": true, 6 | "showOutput": "always", 7 | "args": [ 8 | "run", "watch" 9 | ], 10 | "problemMatcher": "$tsc-watch" 11 | } -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/**/* 2 | .gitignore 3 | .travis.yml 4 | appveyor.yml 5 | src/**/* 6 | out/tests/**/* 7 | node_modules/**/* 8 | **/*.js.map 9 | !node_modules/vscode-debugprotocol/**/* 10 | !node_modules/vscode-debugadapter/**/* 11 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Marco Mastropaolo 2 | All rights reserved. 3 | 4 | The MoonSharp icon is (c) Isaac, 2014-2015 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the {organization} nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /ThirdPartyNotices.txt: -------------------------------------------------------------------------------- 1 | THIRD-PARTY SOFTWARE NOTICES AND INFORMATION 2 | Do Not Translate or Localize 3 | 4 | This project incorporates material from the project(s) listed below (collectively, “Third Party Code”). 5 | Microsoft is not the original author of the Third Party Code. The original copyright notice and license 6 | under which Microsoft received such Third Party Code are set out below. This Third Party Code is licensed 7 | to you under their original license terms set forth below. Microsoft reserves all other rights not 8 | expressly granted, whether by implication, estoppel or otherwise. 9 | 10 | 11 | 1. DefinitelyTyped version 0.0.1 (https://github.com/borisyankov/DefinitelyTyped) 12 | 13 | 14 | %% DefinitelyTyped NOTICES AND INFORMATION BEGIN HERE 15 | ========================================= 16 | This project is licensed under the MIT license. 17 | Copyrights are respective of each contributor listed at the beginning of each definition file. 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | ========================================= 37 | END OF DefinitelyTyped NOTICES AND INFORMATION 38 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | install: 2 | - ps: Install-Product node 5.11 x64 3 | 4 | build_script: 5 | - npm install 6 | 7 | test_script: 8 | - npm test 9 | -------------------------------------------------------------------------------- /images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PixelVision8/VSCodePlugin/823a7af60bf98a93c04b6cd56c732c0e1c8b5d3e/images/icon.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pixel-vision-8", 3 | "displayName": "Pixel Vision 8", 4 | "version": "2.0.0", 5 | "publisher": "PixelVision8", 6 | "description": "Full API code-completion and debugger for making Pixel Vision 8 games in Lua and C#.", 7 | "author": { 8 | "name": "Jesse Freeman", 9 | "email": "makegames@pixelvision8.com" 10 | }, 11 | "engines": { 12 | "vscode": "^1.1.0", 13 | "node": "^5.10.0" 14 | }, 15 | "icon": "images/icon.png", 16 | "categories": [ 17 | "Debuggers", "Snippets" 18 | ], 19 | "private": true, 20 | "repository": { 21 | "type": "git", 22 | "url": "https://github.com/PixelVision8/PixelVisionVSCodePlugin/" 23 | }, 24 | "bugs": { 25 | "url": "https://github.com/PixelVision8/PixelVisionVSCodePlugin/issues/" 26 | }, 27 | "dependencies": {}, 28 | "devDependencies": { 29 | "@types/es6-collections": "^0.5.29", 30 | "@types/es6-promise": "0.0.32", 31 | "@types/mocha": "^2.2.32", 32 | "@types/node": "^6.0.39", 33 | "typescript": "^2.0.2", 34 | "mocha": "^3.0.2", 35 | "vscode": "^0.11.18", 36 | "vscode-debugadapter-testsupport": "^1.13.0" 37 | }, 38 | "scripts": { 39 | "prepublish": "node ./node_modules/typescript/bin/tsc -p ./src", 40 | "compile": "node ./node_modules/typescript/bin/tsc -p ./src", 41 | "watch": "node ./node_modules/typescript/bin/tsc -w -p ./src", 42 | "test": "node ./node_modules/mocha/bin/mocha -u tdd ./out/tests/", 43 | "postinstall": "node ./node_modules/vscode/bin/install" 44 | }, 45 | "main": "./out/extension", 46 | "activationEvents": [ 47 | "onCommand:extension.getProgramName" 48 | ], 49 | "contributes": { 50 | "snippets": [ 51 | { 52 | "language": "lua", 53 | "path": "./snippets.json" 54 | }, 55 | { 56 | "language": "csharp", 57 | "path": "./snippets.json" 58 | } 59 | ], 60 | "breakpoints": [ 61 | { 62 | "language": "lua" 63 | }, 64 | { 65 | "language": "text" 66 | } 67 | ], 68 | "debuggers": [ 69 | { 70 | "language": "lua", 71 | "type": "pv8-debug", 72 | "label": "PV8 Debugger", 73 | "debugServer": 1985, 74 | "initialConfigurations": [ 75 | { 76 | "name": "PV8 Debugger Attach", 77 | "type": "pv8-debug", 78 | "request": "attach", 79 | "debugServer": 1985 80 | } 81 | ], 82 | "configurationAttributes": { 83 | "attach": { 84 | "required": [ 85 | 86 | ], 87 | "properties": { 88 | "HELP": { 89 | "type": "string", 90 | "description": "", 91 | "default": "" 92 | } 93 | } 94 | } 95 | } 96 | } 97 | ] 98 | } 99 | } -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # PV8 VSCode Debugger 2 | 3 | This project is based on the [MoonSharp VSCode Debugger](https://github.com/moonsharp-devs/moonsharp/tree/master/src/moonsharp-vscode-debug) 4 | 5 | This is an extension to allow debugging of Lua scripts running inside Pixel Vision 8. 6 | 7 | ## Features supported 8 | 9 | * Connect to the currently running game's Lua script 10 | * Supports breakpoints, watches, local variables, `self` inspection 11 | * Call stack, with visualization of current coroutine 12 | * Watches can contain free formed expressions, as long they are side-effects free 13 | * Inspection of values including internal ids and table contents 14 | * Print statements are displayed in the debug console 15 | 16 | 17 | ## Features not supported 18 | 19 | * Editing of values not supported 20 | * No checks are made for file contents changes 21 | * Due to how vscode works, token-based breakpoints are not supported 22 | 23 | 24 | ## How to use 25 | 26 | 1) Open Pixel Vision 8's Workspace Folder (located in your computer's User directory) 27 | 28 | 2) Create a new launch.json file in a `.VSCode` folder at the root of the Workspace directory with the following: 29 | 30 | ``` 31 | { 32 | "version": "0.2.0", 33 | "debugServer" : 41912, 34 | "configurations": [ 35 | { 36 | "name": "PV8 Debugger Attach", 37 | "type": "pv8-debug", 38 | "request": "attach", 39 | "debugServer": 1985 40 | } 41 | ] 42 | } 43 | ``` 44 | 45 | 3) Hold down the shift key while a game loads to begin the countdown for connecting the debugger. 46 | 47 | 4) In VS Code, select Debug -> PV8 Debugger then switch back over to Pixel Vision 8 48 | 49 | 5) Once the debugger is connected, you should see a debug icon in the title bar 50 | 51 | 6) When the game loads up, you should be able to trigger break points to inspect the code that is currently running. By default, the debugger will break on Init(). 52 | 53 | 7) Type !scripts to display all of the script files that are currently loaded 54 | -------------------------------------------------------------------------------- /snippets.json: -------------------------------------------------------------------------------- 1 | { 2 | "AddScript": { 3 | "prefix": "AddScript", 4 | "body": ["AddScript( ${1:name}, ${2:text} )$3"], 5 | "description": "The AddScript() API allows you to add a new Lua script at runtime from a string. Simply give the script a name and pass in a string with valid Lua code. If a script with the same name exists, it will be overwritten.", 6 | "rightLabel": "PV8 File IO" 7 | }, 8 | "LoadScript": { 9 | "prefix": "LoadScript", 10 | "body": ["LoadScript( ${1:name} )$2"], 11 | "description": "The LoadScript() API allows you to parse a new Lua script at runtime from memory. You can use the AddScript() API to manually load text into memory or add additional Lua files to your game project. Also, any Lua files located in a System/Libs/ folder, whether at the root of the Workspace drive or on a disk, will be available to load.", 12 | "rightLabel": "PV8 File IO" 13 | }, 14 | "BackgroundColor": { 15 | "prefix": "BackgroundColor", 16 | "body": ["BackgroundColor( ${1:id} )$2"], 17 | "description": "The background color is used to fill the screen when clearing the display. You can use this method to read or update the background color at runtime. When calling BackgroundColor() without an argument, it returns the current background color as an int. You can pass in an optional int to update the background color by calling BackgroundColor(0), where 0 is any valid system color ID.", 18 | "rightLabel": "PV8 Colors" 19 | }, 20 | "Button": { 21 | "prefix": "Button", 22 | "body": ["Button( ${1:Buttons}, ${2:InputState}, ${3:controllerID} )$4"], 23 | "description": "The main form of input for Pixel Vision 8 is the controller's buttons. You can get the current state of any button by calling the Button() method and supplying a button ID. There are optional parameters for specifying an InputState and the controller ID.", 24 | "rightLabel": "PV8 Input" 25 | }, 26 | "CalculateDistance": { 27 | "prefix": "CalculateDistance", 28 | "body": ["CalculateDistance( ${1:x0}, ${2:y0}, ${3:x1}, ${4:y1} )$5"], 29 | "description": "Fast calculation to get the distance between two points.", 30 | "rightLabel": "PV8 Math" 31 | }, 32 | "CalculateIndex": { 33 | "prefix": "CalculateIndex", 34 | "body": ["CalculateIndex( ${1:x}, ${2:y}, ${3:width} )$4"], 35 | "description": "Converts an X and Y position into an index. This is useful for finding positions in 1D arrays that represent 2D data.", 36 | "rightLabel": "PV8 Math" 37 | }, 38 | "CalculatePosition": { 39 | "prefix": "CalculatePosition", 40 | "body": ["CalculatePosition( ${1:index}, ${2:width} )$3"], 41 | "description": "Converts an index into an X and Y position to help when working with 1D arrays that represent 2D data.", 42 | "rightLabel": "PV8 Math" 43 | }, 44 | "ChangeSizeMode": { 45 | "prefix": "ChangeSizeMode", 46 | "body": ["ChangeSizeMode( ${1:mode}, )$4"], 47 | "description": "The ChangeSizeMode() API allows you to change the size of sprites at runtime. By default, sprites are 8 x 8 pixels but there are several different SpriteSizes you can choose from which alter the DrawSprite() API.", 48 | "rightLabel": "PV8 Math" 49 | }, 50 | "Clamp": { 51 | "prefix": "Clamp", 52 | "body": ["Clamp( ${1:val}, ${2:min}, ${3:max} )$4"], 53 | "description": "The Clamp() API limits a value between a minimum and maximum integer.", 54 | "rightLabel": "PV8 Math" 55 | }, 56 | "Clear": { 57 | "prefix": "Clear", 58 | "body": ["Clear( ${1:x}, ${2:y}, ${3:width}, ${4:height} )$5"], 59 | "description": "Clearing the display removes all of the existing pixel data, replacing it with the default background color. By calling Clear(), with no arguments, it automatically clears the entire display. You can manually define an area of the screen to clear by supplying optional x, y, width, and height argument values.", 60 | "rightLabel": "PV8 Rendering" 61 | }, 62 | "Color": { 63 | "prefix": "Color", 64 | "body": ["Color( ${1:id}, ${2:value} )$3"], 65 | "description": "The Color() API allows you to read and update color values in the ColorChip. This API has two modes that require a color ID to work. By calling the method with just an ID, like Color(0), it returns a HEX string for that color. If you supply an additional HEX string value, like Color(0, \"#FFFF00\"), you can change the color with the given ID.", 66 | "rightLabel": "PV8 Colors" 67 | }, 68 | "ColorsPerSprite": { 69 | "prefix": "ColorsPerSprite", 70 | "body": ["ColorsPerSprite()$1"], 71 | "description": "Pixel Vision 8 sprites have limits around how many colors they can display at once. This is called CPS which stands for Colors Per Sprite. The ColorsPerSprite() API returns this value from the SpriteChip.", 72 | "rightLabel": "PV8 Colors" 73 | }, 74 | "CharacterToPixelData": { 75 | "prefix": "CharacterToPixelData", 76 | "body": ["CharacterToPixelData( ${1:character}, ${2:fontName} )$3"], 77 | "description": "The CharacterToPixelData() API converts a single font character into raw pixel data.", 78 | "rightLabel": "PV8 Texts" 79 | }, 80 | "ReplaceColor": { 81 | "prefix": "ReplaceColor", 82 | "body": ["ReplaceColor( ${1:destID}, ${2:srcID} )$3"], 83 | "description": "The ReplaceColor() API allows you to quickly replace a color with another color ID. ", 84 | "rightLabel": "PV8 Colors" 85 | }, 86 | "Display": { 87 | "prefix": "Display", 88 | "body": ["Display( ${1:visible} )$2"], 89 | "description": "The Display() method allows you to get the resolution of the display at run time. By default, this will return the visible screen area based on the overscan value set on the DisplayChip.", 90 | "rightLabel": "PV8 Rendering" 91 | }, 92 | "Init": { 93 | "prefix": "Init", 94 | "body": ["Init()$1"], 95 | "description": "Init() is called when a game first loads up. This is where you should store configuration and inialize any variables you may need later on in the Update() and Draw() calls.", 96 | "type": "function", 97 | "rightLabel": "PV8 Lifecycle" 98 | }, 99 | "Draw": { 100 | "prefix": "Draw", 101 | "body": ["Draw()$1"], 102 | "description": "Draw() is called once per frame after the Update() has been completed. This is where all of your game's draw calls should take place such as clearing the display, drawing sprites, and pushing raw pixel data into the display.", 103 | "type": "function", 104 | "rightLabel": "PV8 Lifecycle" 105 | }, 106 | "DrawPixels": { 107 | "prefix": "DrawPixels", 108 | "body": ["DrawPixels( ${1:pixelData}, ${2:x}, ${3:y}, ${4:width}, ${5:height}, ${6:flipH}, ${7:flipV}, ${8:DrawMode}, ${9:colorOffset} )$10"], 109 | "description": "The DrawPixels() API allows you to push raw pixel data directly to the display. While DrawPixels() is used under the hood by all of the drawing APIs, you lose some performance by calling it directly, especially in Lua. Since this bypasses the sprite counter, there is no limit to the number of draw calls you can make to any of the sprite layers.", 110 | "rightLabel": "PV8 Drawing" 111 | }, 112 | "DrawRect": { 113 | "prefix": "DrawRect", 114 | "body": ["DrawRect( ${1:x}, ${2:y}, ${3:width}, ${4:height}, ${5:color}, ${6:DrawMode} )$7"], 115 | "description": "The DrawRect() API allows you to display a rectangle with a fill color on the screen. Since this API uses DrawPixels(), rectangles can be drawn to the tilemap cache or sprite layers.", 116 | "rightLabel": "PV8 Drawing" 117 | }, 118 | "DrawSprite": { 119 | "prefix": "DrawSprite", 120 | "body": ["DrawSprite( ${1:id}, ${2:x}, ${3:y}, ${4:flipH}, ${5:flipV}, ${6:DrawMode}, ${7:colorOffset} )$8"], 121 | "description": "The DrawSprite() API allows you to draw a single sprite to the display. Sprites represent individual collections of 8 x 8 blocks of pixel data. The display also has a limitation on how many sprites that can be on the screen at the same time. Each time you call DrawSprite(), the sprite counts against the total amount the display can render.", 122 | "rightLabel": "PV8 Drawing" 123 | }, 124 | "DrawMetaSprite": { 125 | "prefix": "DrawMetaSprite", 126 | "body": ["DrawMetaSprite( ${1:identifier}, ${2:x}, ${3:y}, ${4:flipH}, ${5:flipV}, ${6:DrawMode}, ${7:colorOffset} )$8"], 127 | "description": "The DrawMetaSprite() API allows you to draw a Sprite Collection to the display. You can supply an id, name, or Sprite Collection as the identifier to render the Meta Sprite to the display.", 128 | "rightLabel": "PV8 Drawing" 129 | }, 130 | "DrawText": { 131 | "prefix": "DrawText", 132 | "body": ["DrawText( ${1:text}, ${2:x}, ${3:y}, ${4:DrawMode}, ${5:font}, ${6:colorOffset}, ${7:spacing} )$8"], 133 | "description": "The DrawText() API allows you to render text to the display. Files ending with the .font.png extension are loaded by the TextChip and converted into character sprites. The TextChip stores these characters separately from SpriteChip’s own sprites.", 134 | "rightLabel": "PV8 Drawing" 135 | }, 136 | "DrawTilemap": { 137 | "prefix": "DrawTilemap", 138 | "body": ["DrawTilemap( ${1:x}, ${2:y}, ${3:columns}, ${4:rows}, ${5:offsetX}, ${6:offsetY}, ${7:drawMode} )$8"], 139 | "description": " By default, the tilemap renders to the display by simply calling DrawTilemap(). This automatically fills the entire display with the visible portion of the tilemap. To have more granular control over how to render the tilemap, you can supply an optional X and Y position to change where it draws on the screen. You can also modify the width (columns) and height (rows) that are displayed too. This is useful if you want to show a HUD or some other kind of image on the screen that is not overridden by the tilemap. To scroll the tilemap, you need to call the ScrollPosition() and supply a new scroll X and Y value. ", 140 | "rightLabel": "PV8 Drawing" 141 | }, 142 | "Flag": { 143 | "prefix": "Flag", 144 | "body": ["Flag( ${1:column}, ${2:row}, ${3:value} )$4"], 145 | "description": "The Flag() API allows you to quickly access just the flag value of a tile. This is useful when trying to calculate collision on the tilemap. By default, you can call this method with just a column and row position to return the flag value at that tile. If you supply a new value, it will be overridden on the tile.", 146 | "rightLabel": "PV8 Tilemap" 147 | }, 148 | "FindMetaSpriteId": { 149 | "prefix": "FindMetaSpriteId", 150 | "body": ["FindMetaSpriteId( ${1:name} )$2"], 151 | "description": "This API allows you to find a Meta Sprite's Id from it's name. This can be used in conjunction with DrawMetaSprite to avoid the overhead of searching for a MetaSprite by its name when drawing to the display.", 152 | "rightLabel": "PV8 Meta Sprites" 153 | }, 154 | "InputString": { 155 | "prefix": "InputString", 156 | "body": ["InputString()$1"], 157 | "description": "The InputString() API returns the keyboard input from the current frame. This API is useful for capturing keyboard text input.", 158 | "rightLabel": "PV8 Input" 159 | }, 160 | "IsChannelPlaying": { 161 | "prefix": "IsChannelPlaying", 162 | "body": ["IsChannelPlaying( ${1:channel} )$2"], 163 | "description": "Returns a bool if the specified audio channel is playing a sound. Since channels can only play one sound effect at a time, you may need to test if a channel is currently playing before playing a new sound effect.", 164 | "rightLabel": "PV8 Sounds" 165 | }, 166 | "Key": { 167 | "prefix": "Key", 168 | "body": ["Key( ${1:Keys}, ${2:InputState} )$3"], 169 | "description": "While the main forms of input for Pixel Vision 8 are the controllers, you can test for keyboard input by calling the Key() API. When this API is called, it returns the current state of that specific key.", 170 | "rightLabel": "PV8 Input" 171 | }, 172 | "MaxSpriteCount": { 173 | "prefix": "MaxSpriteCount", 174 | "body": ["MaxSpriteCount( ${1:total} )$2"], 175 | "description": " This method returns the maximum number of sprites the Display Chip can render in a single frame. Use this to better understand the limitations of the hardware your game is running on. This is a read only property at runtime. ", 176 | "rightLabel": "PV8 Sprites" 177 | }, 178 | "MetaSprite": { 179 | "prefix": "MetaSprite", 180 | "body": ["MetaSprite( ${1:name}, ${2:spriteCollection} )$3"], 181 | "description": "A meta sprite is a collection of sprite data you can treat as a single larger sprite. This API returns the actual Sprite Collection that makes up an indevidual Meta Sprite and accepts an int or string to locate the collection. Supplying an option Sprite Collection will overwrite the existing Meta Sprite with new spite data from the collection.", 182 | "rightLabel": "PV8 Meta Sprites" 183 | }, 184 | "MouseButton": { 185 | "prefix": "MouseButton", 186 | "body": ["MouseButton( ${1:button}, ${2:InputState} )$3"], 187 | "description": "Pixel Vision 8 supports mouse input. You can get the current state of the mouse's left (0) and right (1) buttons by calling MouseButton()API. In addition to supplying a button ID, you can also provide an option InputState.", 188 | "rightLabel": "PV8 Input" 189 | }, 190 | "MousePosition": { 191 | "prefix": "MousePosition", 192 | "body": ["MousePosition()$1"], 193 | "description": "The MousePosition() API returns a Point for the mouse cursor's X and Y position. The mouse's 0,0 position is in the upper left-hand corner of the display and when the mouse is off-screen it will return -1. This value is read-only.", 194 | "rightLabel": "PV8 Input" 195 | }, 196 | "NewPoint": { 197 | "prefix": "NewPoint", 198 | "body": ["NewPoint( ${1:x}, ${2:y} )$3"], 199 | "description": "A Point is a Pixel Vision 8 primitive used for defining an X and Y position on the display. The NewPoint() API creates a new instance for you. It’s important to keep in mind that point only stores integers for the X and Y value.", 200 | "rightLabel": "PV8 Geometry" 201 | }, 202 | "NewRect": { 203 | "prefix": "NewRect", 204 | "body": ["NewRect( ${1:x}, ${2:y}, ${3:w}, ${4:h} )$5"], 205 | "description": "A Rectangle is a Pixel Vision 8 primitive used for defining the bounds of an object on the display. It contains an X, W, Width and Height property. The Rectangle object class also has some additional methods to aid with collision detection.", 206 | "rightLabel": "PV8 Geometry" 207 | }, 208 | "NewCanvas": { 209 | "prefix": "NewCanvas", 210 | "body": ["NewCanvas( ${1:w}, ${2:h} )$3"], 211 | "description": "The canvas is a special TextureData derivative that supports drawing primitive shapes such as lines, circles, and rectangles. You can also draw sprites and text to it as well. When you are done drawing on the canvas, you can copy the pixel data into the SpriteChip or directly to the tilemap cache. While the canvas allows run-time drawing, it’s not part of the core Pixel Vision 8 API.", 212 | "rightLabel": "PV8 Canvas" 213 | }, 214 | "NewSpriteData": { 215 | "prefix": "NewSpriteData", 216 | "body": ["NewSpriteData( ${1:id}, ${2:x}, ${3:y}, ${4:flipH}, ${5:flipV}, ${6:colorOffset} )$7"], 217 | "description": "Sprite Data represents a single sprite that makes up part of a larger collection of sprites that define a single meta sprite. It allows you to define the sprite Id, x, y, flip, and color offset for that individual sprite.", 218 | "rightLabel": "PV8 Meta Sprites" 219 | }, 220 | "NewMetaSprite": { 221 | "prefix": "NewMetaSprite", 222 | "body": ["NewSpriteData( ${1:id}, ${2:name}, ${3:spriteIds}, ${4:columns}, ${5:height}, ${6:colorOffset} )$7"], 223 | "description": "A meta sprite is a collection of sprite data you can treat as a single larger sprite. This API helps to quickly create MetaSprites from a collection of sprite Ids in a grid which is define by the width and height values.", 224 | "rightLabel": "PV8 Meta Sprites" 225 | }, 226 | "NewSpriteCollection": { 227 | "prefix": "NewSpriteCollection", 228 | "body": ["NewSpriteCollection( ${1:name}, ${2:sprites} )$3"], 229 | "description": "A sprite collection contains multiple sprites each with their own unique position, orientation, and color offset. Collectively, these sprites represent a single larger 'meta sprite' you can draw to the display in a single shot.", 230 | "rightLabel": "PV8 Meta Sprites" 231 | }, 232 | "PaletteOffset": { 233 | "prefix": "PaletteOffset", 234 | "body": ["PaletteOffset( ${1:value}, ${2:paletteColorID} )$3"], 235 | "description": "By calling the PaletteOffset() API, it will convert a palette ID into the correct color ID for you. When used in the place of any of the drawing API’s colorOffset arguments, you can easily shift between any of the 8 palettes during run-time. There is an optional argument to supply a paletteColorID which gives you the color ID for a specific position inside of the palette.", 236 | "rightLabel": "PV8 Colors" 237 | }, 238 | "PauseSong": { 239 | "prefix": "PauseSong", 240 | "body": ["PauseSong()$1"], 241 | "description": "The PauseSong() API toggles the current playback state of the sequencer. If the song is playing, it will pause. If the song is paused, it will play.", 242 | "rightLabel": "PV8 Music" 243 | }, 244 | "PlaySong": { 245 | "prefix": "PlaySong", 246 | "body": ["PlaySong( ${1:id}, ${2:loop}, ${3:startAt} )$4"], 247 | "description": "The PlaySong() API allows you to activate the MusicChip’s tracker to playback any of the songs stored in memory. A song is simply a collection of patterns. You can supply an optional parameter called startAt to tell the MusicChip which pattern to start the song at.", 248 | "rightLabel": "PV8 Music" 249 | }, 250 | "PlaySound": { 251 | "prefix": "PlaySound", 252 | "body": ["PlaySound( ${1:id}, ${2:channel} )$3"], 253 | "description": "The PlaySound() API allows playing a single sound effect on a specific channel. The SoundChip has a limited number of active channels, so playing a sound effect on a channel where a sound is already playing will override it.", 254 | "rightLabel": "PV8 Sounds" 255 | }, 256 | "WriteMetadata": { 257 | "prefix": "WriteMetadata", 258 | "body": ["WriteMetadata( ${1:key}, ${2:value} )$3"], 259 | "description": "The WriteMetadata() API allows you to modify or add new values to the game’s metadata which can be read when the game reloads. Values written to the Metadata will be erased when the game closes and a new game is loaded in its place.", 260 | "rightLabel": "PV8 File IO" 261 | }, 262 | "ReadMetadata": { 263 | "prefix": "ReadMetadata", 264 | "body": ["ReadMetadata( ${1:key}, ${2:defaultValue} )$3"], 265 | "description": "The ReadMetadata() API allows you to read the metadata that is passed into the game when it loads. This is used by the Pixel Vision 8 Runner to pass data between load sessions.", 266 | "rightLabel": "PV8 File IO" 267 | }, 268 | "ReadFPS": { 269 | "prefix": "ReadFPS", 270 | "body": ["ReadFPS()$1"], 271 | "description": "The ReadFPS() API allows see the engine's current FPS counter which is updated on the previous frame.", 272 | "rightLabel": "PV8 Debug" 273 | }, 274 | "ReadSaveData": { 275 | "prefix": "ReadSaveData", 276 | "body": ["ReadSaveData( ${1:key}, ${2:defaultValue} )$3"], 277 | "description": "The ReadSaveData() API allows you to read saved data by supplying a key. If no matching key exists, \"undefined\" is returned.", 278 | "rightLabel": "PV8 File IO" 279 | }, 280 | "ReadTotalSprites": { 281 | "prefix": "ReadTotalSprites", 282 | "body": ["ReadTotalSprites()$1"], 283 | "description": "The ReadTotalSprites() API allows see the engine's current sprite count which is updated previous frame.", 284 | "rightLabel": "PV8 Debug" 285 | }, 286 | "RebuildTilemap": { 287 | "prefix": "RebuildTilemap", 288 | "body": ["RebuildTilemap()$1"], 289 | "description": "The RebuildTilemap() API forces the tilemap to redraw the tilemap cache layer. Use this to clear any pixel data drawn on top of tiles in the tilemap cache layer.", 290 | "rightLabel": "PV8 Tilemap" 291 | }, 292 | "RedrawDisplay": { 293 | "prefix": "RedrawDisplay", 294 | "body": ["RedrawDisplay()$1"], 295 | "description": "The RedrawAPI() allows you to execute both the Clear() and DrawTilemap() APIs in a single call. This is a simple helper function to make redrawing the display easier. If you need to supply additional arguments to either the Clear() or DrawTilemap() APIs, then you’ll need to call each one independently without using RedrawDisplay().", 296 | "rightLabel": "PV8 Rendering" 297 | }, 298 | "Repeat": { 299 | "prefix": "Repeat", 300 | "body": ["Repeat( ${1:val}, ${2:max} )$3"], 301 | "description": "The Repeat() API allows you to reset the value of a number if it goes past a maximum value. When counting backward, Repeat() will set the value to the maximum when below 0.", 302 | "rightLabel": "PV8 Math" 303 | }, 304 | "Reset": { 305 | "prefix": "Reset", 306 | "body": ["Reset()$1"], 307 | "description": "Reset() is called when a game is restarted. This is called instead of reloading the entire game. It allows you to perform additional configuration that should happen if the Init() method is not called.", 308 | "type": "function", 309 | "rightLabel": "PV8 Lifecycle" 310 | }, 311 | "RewindSong": { 312 | "prefix": "RewindSong", 313 | "body": ["RewindSong( ${1:position}, ${2:loopID} )$3"], 314 | "description": "The RewindSong() API allows you rewind the currently playing song to a specific position and pattern ID. Calling this API without any arguments will simply rewind the song to the beginning of the first pattern.", 315 | "rightLabel": "PV8 Music" 316 | }, 317 | "ScrollPosition": { 318 | "prefix": "ScrollPosition", 319 | "body": ["ScrollPosition( ${1:x}, ${2:y} )$3"], 320 | "description": "You can scroll the tilemap by calling the ScrollPosition() API and supplying a new scroll X and Y position. By default, calling ScrollPosition() with no arguments returns a Point with the current scroll X and Y values. If you supply an X and Y value, it updates the tilemap's scroll position the next time you call the DrawTilemap() API.", 321 | "rightLabel": "PV8 Rendering" 322 | }, 323 | "Shutdown": { 324 | "prefix": "Shutdown", 325 | "body": ["Shutdown()$1"], 326 | "description": "Shutdown() is called when quitting a game or shutting down the Runner/Game Creator. This hook allows you to perform any last minute changes to the game's data such as saving or removing any temp files that will not be needed.", 327 | "rightLabel": "PV8 Lifecycle" 328 | }, 329 | "SongData": { 330 | "prefix": "SongData", 331 | "body": ["SongData()$1"], 332 | "description": " Returns a dictionary with information about the current state of the music chip. ", 333 | "rightLabel": "PV8 Music" 334 | }, 335 | "Sound": { 336 | "prefix": "Sound", 337 | "body": ["Sound( ${1:id}, ${2:data} )$3"], 338 | "description": "The Sound() API allows you to read raw sound data from the SoundChip. You need to provide a sound effect ID. If you supply the optional data argument, which is a comma-delimited string of sound effect property values, you’ll be able to update the sound effect.", 339 | "rightLabel": "PV8 Sounds" 340 | }, 341 | "SplitLines": { 342 | "prefix": "SplitLines", 343 | "body": ["SplitLines( ${1:str} )$2"], 344 | "description": " This calls the TextUtil's SplitLines() helper to convert text with line breaks (\\n) into a collection of lines. This can be used in conjunction with the WordWrap() helper to render large blocks of text line by line with the DrawText() API. ", 345 | "rightLabel": "PV8 Text" 346 | }, 347 | "Sprite": { 348 | "prefix": "Sprite", 349 | "body": ["Sprite( ${1:id}, ${2:data} )$3"], 350 | "description": "The Sprite() API allows you to read and write pixel data directly to the SpriteChip’s memory. Sprite pixel data is simply an array of color IDs. When calling the Sprite() with only an ID argument, you will get the sprite's pixel data. If you supply data, it will overwrite the sprite.", 351 | "rightLabel": "PV8 Sprites" 352 | }, 353 | "SpriteSize": { 354 | "prefix": "SpriteSize", 355 | "body": ["SpriteSize( ${1:width}, ${2:height} )$3"], 356 | "description":" Returns the size of the sprite as a Vector where X and Y represent the width and height.", 357 | "rightLabel": "PV8 Sprites" 358 | }, 359 | "StopSong": { 360 | "prefix": "StopSong", 361 | "body": ["StopSong()$1"], 362 | "description": "The StopSong() API will stop the currently playing song.", 363 | "rightLabel": "PV8 Music" 364 | }, 365 | "StopSound": { 366 | "prefix": "StopSound", 367 | "body": ["StopSound( ${1:channel} )$2"], 368 | "description": "Use StopSound() to stop any sound playing on a specific channel.", 369 | "rightLabel": "PV8 Sounds" 370 | }, 371 | "Tile": { 372 | "prefix": "Tile", 373 | "body": ["Tile( ${1:column}, ${2:row}, ${3:spriteID}, ${4:colorOffset}, ${5:flag}, ${6:flipH}, ${7:flipV} )$8"], 374 | "description": "The Tile() API allows you to get the current sprite, color offset and flag values associated with a given tile ID. You can optionally supply your own values if you want to update the tile. ", 375 | "rightLabel": "PV8 Tilemap" 376 | }, 377 | "TilemapSize": { 378 | "prefix": "TilemapSize", 379 | "body": ["TilemapSize( ${1:width}, ${2:height}, ${3:clear} )$4"], 380 | "description": "The TilemapSize() API returns a Point representing the size of the tilemap in columns (X) and rows (Y). To find the size in pixels, you will need to multiply the returned Point’s X and Y values by the sprite size's X and Y. This method also allows you to resize the tilemap by passing in an optional new Width and Height.", 381 | "rightLabel": "PV8 Tilemap" 382 | }, 383 | "TotalColors": { 384 | "prefix": "TotalColors", 385 | "body": ["TotalColors( ${1:ignoreEmpty} )$2"], 386 | "description": " The TotalColors() method simply returns the total number of colors in the ColorsChip. By default, it returns only colors that have been set to value other than magenta (#FF00FF) which is the default transparent value used by the engine. By calling TotalColors(false), it returns the total available color slots in the ColorsChip. ", 387 | "rightLabel": "PV8 Colors" 388 | }, 389 | "TotalSprites": { 390 | "prefix": "TotalSprites", 391 | "body": ["TotalSprites( ${1:ignoreEmpty} )$2"], 392 | "description": "The TotalSprites() API returns the total number of sprites in the SpriteChip. By supplying true for the ignoreEmpty parameter, it will only return sprites that contain pixel data.", 393 | "rightLabel": "PV8 Sprites" 394 | }, 395 | "TotalMetaSprites": { 396 | "prefix": "TotalMetaSprites", 397 | "body": ["TotalMetaSprites( ${1:total} )$2"], 398 | "description": "The TotalMetaSprites() API returns the total number of meta sprites stored the GameChip. By supplying an option value, you can change the total number of Meta Sprites that can be stored in memory.", 399 | "rightLabel": "PV8 Meta Sprites" 400 | }, 401 | "Update": { 402 | "prefix": "Update", 403 | "body": ["Update( timeDelta )$0"], 404 | "description": "Update() is called once per frame at the beginning of the game loop. This is where you should put all non-visual game logic such as character position calculations, detecting input and performing updates to your animation system. The timeDelta is provided on each frame so you can calculate the difference in milliseconds since the last render took place.", 405 | "type": "function", 406 | "rightLabel": "PV8 Lifecycle" 407 | }, 408 | "UpdateTiles": { 409 | "prefix": "UpdateTiles", 410 | "body": ["UpdateTiles( ${1:ids}, ${2:column}, ${3:row}, ${4:columns}, ${5:colorOffset}, ${6:flag} )$7"], 411 | "description": "The UpdateTiles() API allows you to update the color offset and flag values of multiple tiles at once. Simply supply an array of tile IDs and the new tile’s color offset and a flag value. This helper method uses the Tile() API under the hood to update each tile, so any changes to a tile’s color offset will automatically force it to be redrawn to the tilemap cache layer.", 412 | "rightLabel": "PV8 Tilemap" 413 | }, 414 | "WordWrap": { 415 | "prefix": "WordWrap", 416 | "body": ["WordWrap( ${1:text}, ${2:width} )$3"], 417 | "description": "The WordWrap() API allows you to wrap a string of text to a specified character width. It will automatically insert new line breaks (\n) to keep each line of text within the specified width. This can be used in conjunction with the SplitLines() API to render large blocks of text to the display line by line within a specific character width.", 418 | "rightLabel": "PV8 Text" 419 | }, 420 | "WriteSaveData": { 421 | "prefix": "WriteSaveData", 422 | "body": ["WriteSaveData( ${1:key}, ${2:value} )$3"], 423 | "description": "The WriteSaveData() API allows you to write saved data by supplying a key and value. Once saved, this data persists even after restarting a game.", 424 | "rightLabel": "PV8 File IO" 425 | }, 426 | "SpriteSizes.Mode1": { 427 | "prefix": "SpriteSizes.Mode1", 428 | "body": ["SpriteSizes.Mode1"], 429 | "description": "Changes sprites to 8 x 8 pixels.", 430 | "rightLabel": "PV8 Size Mode" 431 | }, 432 | "SpriteSizes.Mode2": { 433 | "prefix": "SpriteSizes.Mode2", 434 | "body": ["SpriteSizes.Mode2"], 435 | "description": "Changes sprites to 8 x 16 pixels.", 436 | "rightLabel": "PV8 Size Mode" 437 | }, 438 | "SpriteSizes.Mode3": { 439 | "prefix": "SpriteSizes.Mode3", 440 | "body": ["SpriteSizes.Mode3"], 441 | "description": "Changes sprites to 16 x 8 pixels.", 442 | "rightLabel": "PV8 Size Mode" 443 | }, 444 | "SpriteSizes.Mode4": { 445 | "prefix": "SpriteSizes.Mode4", 446 | "body": ["SpriteSizes.Mode4"], 447 | "description": "Changes sprites to 16 x 16 pixels.", 448 | "rightLabel": "PV8 Size Mode" 449 | }, 450 | "SpriteSizes.Mode5": { 451 | "prefix": "SpriteSizes.Mode5", 452 | "body": ["SpriteSizes.Mode5"], 453 | "description": "Changes sprites to 32 x 32 pixels.", 454 | "rightLabel": "PV8 Size Mode" 455 | }, 456 | "DrawMode.TilemapCache": { 457 | "prefix": "DrawMode.TilemapCache", 458 | "body": ["DrawMode.TilemapCache"], 459 | "description": "Draws pixel data to the tilemap cache layer.", 460 | "rightLabel": "PV8 Draw Mode" 461 | }, 462 | "DrawMode.SpriteBelow": { 463 | "prefix": "DrawMode.SpriteBelow", 464 | "body": ["DrawMode.SpriteBelow"], 465 | "description": "This is a layer dedicated to sprites just above the background.", 466 | "rightLabel": "PV8 Draw Mode" 467 | }, 468 | "DrawMode.Tile": { 469 | "prefix": "DrawMode.Tile", 470 | "body": ["DrawMode.Tile"], 471 | "description": "This is the tilemap layer and is drawn above the SpriteBelow layer allowing sprites to appear behind the background.", 472 | "rightLabel": "PV8 Draw Mode" 473 | }, 474 | "DrawMode.Sprite": { 475 | "prefix": "DrawMode.Sprite", 476 | "body": ["DrawMode.Sprite"], 477 | "description": "This is the default layer for sprites to be rendered at. It is above the background.", 478 | "rightLabel": "PV8 Draw Mode" 479 | }, 480 | "DrawMode.UI": { 481 | "prefix": "DrawMode.UI", 482 | "body": ["DrawMode.UI"], 483 | "description": "This is a special layer which can be used to draw raw pixel data above the background and sprites. It's designed for HUDs in your game and other graphics that do not scroll with the tilemap.", 484 | "rightLabel": "PV8 Draw Mode" 485 | }, 486 | "DrawMode.SpriteAbove": { 487 | "prefix": "DrawMode.SpriteAbove", 488 | "body": ["DrawMode.SpriteAbove"], 489 | "description": "This layer allows sprites to render above the UI layer. It is useful for mouse cursors or other graphics that need to be on top of all other layers.", 490 | "rightLabel": "PV8 Draw Mode" 491 | }, 492 | "InputState.Down": { 493 | "prefix": "InputState.Down", 494 | "body": ["InputState.Down"], 495 | "description": "Determins if the input is currently down.", 496 | "rightLabel": "PV8 Input State" 497 | }, 498 | "InputState.Released": { 499 | "prefix": "InputState.Released", 500 | "body": ["InputState.Released"], 501 | "description": "Determins if the input is currently up but was down in the previous frame.", 502 | "rightLabel": "PV8 Input State" 503 | }, 504 | "Buttons.Up": { 505 | "prefix": "Buttons.Up", 506 | "body": ["Buttons.Up"], 507 | "description": "This represents the Up button on the controller." 508 | }, 509 | "Buttons.Down": { 510 | "prefix": "Buttons.Down", 511 | "body": ["Buttons.Down"], 512 | "description": "This represents the Down button on the controller." 513 | }, 514 | "Buttons.Left": { 515 | "prefix": "Buttons.Left", 516 | "body": ["Buttons.Left"], 517 | "description": "This represents the Left button on the controller." 518 | }, 519 | "Buttons.Right": { 520 | "prefix": "Buttons.Right", 521 | "body": ["Buttons.Right"], 522 | "description": "This represents the Right button on the controller." 523 | }, 524 | "Buttons.A": { 525 | "prefix": "Buttons.A", 526 | "body": ["Buttons.A"], 527 | "description": "This represents the A button on the controller." 528 | }, 529 | "Buttons.B": { 530 | "prefix": "Buttons.B", 531 | "body": ["Buttons.B"], 532 | "description": "This represents the B button on the controller." 533 | }, 534 | "Buttons.Select": { 535 | "prefix": "Buttons.Select", 536 | "body": ["Buttons.Select"], 537 | "description": "This represents the Select button on the controller." 538 | }, 539 | "Buttons.Start": { 540 | "prefix": "Buttons.Start", 541 | "body": ["Buttons.Start"], 542 | "description": "This represents the Start button on the controller." 543 | }, 544 | "Keys.Backspace": { 545 | "prefix": "Keys.Backspace", 546 | "body": ["Keys.Backspace"], 547 | "description": "Represents the keyboard's 'Backspace' key (8)." 548 | }, 549 | "Keys.Tab": { 550 | "prefix": "Keys.Tab", 551 | "body": ["Keys.Tab"], 552 | "description": "Represents the keyboard's 'Tab' key (9)." 553 | }, 554 | "Keys.Enter": { 555 | "prefix": "Keys.Enter", 556 | "body": ["Keys.Enter"], 557 | "description": "Represents the keyboard's 'Enter' key (13)." 558 | }, 559 | "Keys.Escape": { 560 | "prefix": "Keys.Escape", 561 | "body": ["Keys.Escape"], 562 | "description": "Represents the keyboard's 'Escape' key (27)." 563 | }, 564 | "Keys.Space": { 565 | "prefix": "Keys.Space", 566 | "body": ["Keys.Space"], 567 | "description": "Represents the keyboard's 'Space' key (32)." 568 | }, 569 | "Keys.PageUp": { 570 | "prefix": "Keys.PageUp", 571 | "body": ["Keys.PageUp"], 572 | "description": "Represents the keyboard's 'Page Up' key (33)." 573 | }, 574 | "Keys.PageDown": { 575 | "prefix": "Keys.PageDown", 576 | "body": ["Keys.PageDown"], 577 | "description": "Represents the keyboard's 'Page Down' key (34)." 578 | }, 579 | "Keys.End": { 580 | "prefix": "Keys.End", 581 | "body": ["Keys.End"], 582 | "description": "Represents the keyboard's 'End' key (35)." 583 | }, 584 | "Keys.Home": { 585 | "prefix": "Keys.Home", 586 | "body": ["Keys.Home"], 587 | "description": "Represents the keyboard's 'Home' key (36)." 588 | }, 589 | "Keys.Left": { 590 | "prefix": "Keys.Left", 591 | "body": ["Keys.Left"], 592 | "description": "Represents the keyboard's 'Left' arrow key (37)." 593 | }, 594 | "Keys.Up": { 595 | "prefix": "Keys.Up", 596 | "body": ["Keys.Up"], 597 | "description": "Represents the keyboard's 'Up' arrow key (38)." 598 | }, 599 | "Keys.Right": { 600 | "prefix": "Keys.Right", 601 | "body": ["Keys.Right"], 602 | "description": "Represents the keyboard's 'Right' arrow key (39)." 603 | }, 604 | "Keys.Down": { 605 | "prefix": "Keys.Down", 606 | "body": ["Keys.Down"], 607 | "description": "Represents the keyboard's 'Down' arrow key (40)." 608 | }, 609 | "Keys.Insert": { 610 | "prefix": "Keys.Insert", 611 | "body": ["Keys.Insert"], 612 | "description": "Represents the keyboard's 'Insert' key (45)." 613 | }, 614 | "Keys.Delete": { 615 | "prefix": "Keys.Delete", 616 | "body": ["Keys.Delete"], 617 | "description": "Represents the keyboard's 'Delete' key (46)." 618 | }, 619 | "Keys.D0": { 620 | "prefix": "Keys.D0", 621 | "body": ["Keys.D0"], 622 | "description": "Represents the keyboard's '0' number key (48)." 623 | }, 624 | "Keys.D1": { 625 | "prefix": "Keys.D1", 626 | "body": ["Keys.D1"], 627 | "description": "Represents the keyboard's '1' number key (49)." 628 | }, 629 | "Keys.D2": { 630 | "prefix": "Keys.D2", 631 | "body": ["Keys.D2"], 632 | "description": "Represents the keyboard's '2' number key (50)." 633 | }, 634 | "Keys.D3": { 635 | "prefix": "Keys.D3", 636 | "body": ["Keys.D3"], 637 | "description": "Represents the keyboard's '3' number key (51)." 638 | }, 639 | "Keys.D4": { 640 | "prefix": "Keys.D4", 641 | "body": ["Keys.D4"], 642 | "description": "Represents the keyboard's '4' number key (52)." 643 | }, 644 | "Keys.D5": { 645 | "prefix": "Keys.D5", 646 | "body": ["Keys.D5"], 647 | "description": "Represents the keyboard's '5' number key (53)." 648 | }, 649 | "Keys.D6": { 650 | "prefix": "Keys.D6", 651 | "body": ["Keys.D6"], 652 | "description": "Represents the keyboard's '6' number key (54)." 653 | }, 654 | "Keys.D7": { 655 | "prefix": "Keys.D7", 656 | "body": ["Keys.D7"], 657 | "description": "Represents the keyboard's '7' number key (55)." 658 | }, 659 | "Keys.D8": { 660 | "prefix": "Keys.D8", 661 | "body": ["Keys.D8"], 662 | "description": "Represents the keyboard's '8' number key (56)." 663 | }, 664 | "Keys.D9": { 665 | "prefix": "Keys.D9", 666 | "body": ["Keys.D9"], 667 | "description": "Represents the keyboard's '9' number key (57)." 668 | }, 669 | "Keys.A": { 670 | "prefix": "Keys.A", 671 | "body": ["Keys.A"], 672 | "description": "Represents the keyboard's 'A' key (65)." 673 | }, 674 | "Keys.B": { 675 | "prefix": "Keys.B", 676 | "body": ["Keys.B"], 677 | "description": "Represents the keyboard's 'B' key (66)." 678 | }, 679 | "Keys.C": { 680 | "prefix": "Keys.C", 681 | "body": ["Keys.C"], 682 | "description": "Represents the keyboard's 'C' key (67)." 683 | }, 684 | "Keys.D": { 685 | "prefix": "Keys.D", 686 | "body": ["Keys.D"], 687 | "description": "Represents the keyboard's 'D' key (68)." 688 | }, 689 | "Keys.E": { 690 | "prefix": "Keys.E", 691 | "body": ["Keys.E"], 692 | "description": "Represents the keyboard's 'E' key (69)." 693 | }, 694 | "Keys.F": { 695 | "prefix": "Keys.F", 696 | "body": ["Keys.F"], 697 | "description": "Represents the keyboard's 'F' key (70)." 698 | }, 699 | "Keys.G": { 700 | "prefix": "Keys.G", 701 | "body": ["Keys.G"], 702 | "description": "Represents the keyboard's 'G' key (71)." 703 | }, 704 | "Keys.H": { 705 | "prefix": "Keys.H", 706 | "body": ["Keys.H"], 707 | "description": "Represents the keyboard's 'H' key (72)." 708 | }, 709 | "Keys.I": { 710 | "prefix": "Keys.I", 711 | "body": ["Keys.I"], 712 | "description": "Represents the keyboard's 'I' key (73)." 713 | }, 714 | "Keys.J": { 715 | "prefix": "Keys.J", 716 | "body": ["Keys.J"], 717 | "description": "Represents the keyboard's 'J' key (74)." 718 | }, 719 | "Keys.K": { 720 | "prefix": "Keys.K", 721 | "body": ["Keys.K"], 722 | "description": "Represents the keyboard's 'K' key (75)." 723 | }, 724 | "Keys.L": { 725 | "prefix": "Keys.L", 726 | "body": ["Keys.L"], 727 | "description": "Represents the keyboard's 'L' key (76)." 728 | }, 729 | "Keys.M": { 730 | "prefix": "Keys.M", 731 | "body": ["Keys.M"], 732 | "description": "Represents the keyboard's 'M' key (77)." 733 | }, 734 | "Keys.N": { 735 | "prefix": "Keys.N", 736 | "body": ["Keys.N"], 737 | "description": "Represents the keyboard's 'N' key (78)." 738 | }, 739 | "Keys.O": { 740 | "prefix": "Keys.O", 741 | "body": ["Keys.O"], 742 | "description": "Represents the keyboard's 'O' key (79)." 743 | }, 744 | "Keys.P": { 745 | "prefix": "Keys.P", 746 | "body": ["Keys.P"], 747 | "description": "Represents the keyboard's 'P' key (80)." 748 | }, 749 | "Keys.Q": { 750 | "prefix": "Keys.Q", 751 | "body": ["Keys.Q"], 752 | "description": "Represents the keyboard's 'Q' key (81)." 753 | }, 754 | "Keys.R": { 755 | "prefix": "Keys.R", 756 | "body": ["Keys.R"], 757 | "description": "Represents the keyboard's 'R' key (82)." 758 | }, 759 | "Keys.S": { 760 | "prefix": "Keys.S", 761 | "body": ["Keys.S"], 762 | "description": "Represents the keyboard's 'S' key (83)." 763 | }, 764 | "Keys.T": { 765 | "prefix": "Keys.T", 766 | "body": ["Keys.T"], 767 | "description": "Represents the keyboard's 'T' key (84)." 768 | }, 769 | "Keys.U": { 770 | "prefix": "Keys.U", 771 | "body": ["Keys.U"], 772 | "description": "Represents the keyboard's 'U' key (85)." 773 | }, 774 | "Keys.V": { 775 | "prefix": "Keys.V", 776 | "body": ["Keys.V"], 777 | "description": "Represents the keyboard's 'V' key (86)." 778 | }, 779 | "Keys.W": { 780 | "prefix": "Keys.W", 781 | "body": ["Keys.W"], 782 | "description": "Represents the keyboard's 'W' key (87)." 783 | }, 784 | "Keys.X": { 785 | "prefix": "Keys.X", 786 | "body": ["Keys.X"], 787 | "description": "Represents the keyboard's 'X' key (88)." 788 | }, 789 | "Keys.Y": { 790 | "prefix": "Keys.Y", 791 | "body": ["Keys.Y"], 792 | "description": "Represents the keyboard's 'Y' key (89)." 793 | }, 794 | "Keys.Z": { 795 | "prefix": "Keys.Z", 796 | "body": ["Keys.Z"], 797 | "description": "Represents the keyboard's 'Z' key (90)." 798 | }, 799 | "Keys.NumPad0": { 800 | "prefix": "Keys.NumPad0", 801 | "body": ["Keys.NumPad0"], 802 | "description": "Represents the keyboard's '0' number pad key (96)." 803 | }, 804 | "Keys.NumPad1": { 805 | "prefix": "Keys.NumPad1", 806 | "body": ["Keys.NumPad1"], 807 | "description": "Represents the keyboard's '1' number pad key (97)." 808 | }, 809 | "Keys.NumPad2": { 810 | "prefix": "Keys.NumPad2", 811 | "body": ["Keys.NumPad2"], 812 | "description": "Represents the keyboard's '2' number pad key (98)." 813 | }, 814 | "Keys.NumPad3": { 815 | "prefix": "Keys.NumPad3", 816 | "body": ["Keys.NumPad3"], 817 | "description": "Represents the keyboard's '3' number pad key (99)." 818 | }, 819 | "Keys.NumPad4": { 820 | "prefix": "Keys.NumPad4", 821 | "body": ["Keys.NumPad4"], 822 | "description": "Represents the keyboard's '4' number pad key (100)." 823 | }, 824 | "Keys.NumPad5": { 825 | "prefix": "Keys.NumPad5", 826 | "body": ["Keys.NumPad5"], 827 | "description": "Represents the keyboard's '5' number pad key (101)." 828 | }, 829 | "Keys.NumPad6": { 830 | "prefix": "Keys.NumPad6", 831 | "body": ["Keys.NumPad6"], 832 | "description": "Represents the keyboard's '6' number pad key (102)." 833 | }, 834 | "Keys.NumPad7": { 835 | "prefix": "Keys.NumPad7", 836 | "body": ["Keys.NumPad7"], 837 | "description": "Represents the keyboard's '7' number pad key (103)." 838 | }, 839 | "Keys.NumPad8": { 840 | "prefix": "Keys.NumPad8", 841 | "body": ["Keys.NumPad8"], 842 | "description": "Represents the keyboard's '8' number pad key (104)." 843 | }, 844 | "Keys.NumPad9": { 845 | "prefix": "Keys.NumPad9", 846 | "body": ["Keys.NumPad9"], 847 | "description": "Represents the keyboard's '9' number pad key (105)." 848 | }, 849 | "Keys.Multiply": { 850 | "prefix": "Keys.Multiply", 851 | "body": ["Keys.Multiply"], 852 | "description": "Represents the keyboard's 'Multiply' key (106)." 853 | }, 854 | "Keys.Add": { 855 | "prefix": "Keys.Add", 856 | "body": ["Keys.Add"], 857 | "description": "Represents the keyboard's 'Add' key (107)." 858 | }, 859 | "Keys.Separator": { 860 | "prefix": "Keys.Separator", 861 | "body": ["Keys.Separator"], 862 | "description": "Represents the keyboard's 'Separator' key (108)." 863 | }, 864 | "Keys.Subtract": { 865 | "prefix": "Keys.Subtract", 866 | "body": ["Keys.Subtract"], 867 | "description": "Represents the keyboard's 'Subtract' key (109)." 868 | }, 869 | "Keys.Decimal": { 870 | "prefix": "Keys.Decimal", 871 | "body": ["Keys.Decimal"], 872 | "description": "Represents the keyboard's 'Decimal' key (110)." 873 | }, 874 | "Keys.Divide": { 875 | "prefix": "Keys.Divide", 876 | "body": ["Keys.Divide"], 877 | "description": "Represents the keyboard's 'Divide' key (111)." 878 | }, 879 | "Keys.LeftShift": { 880 | "prefix": "Keys.LeftShift", 881 | "body": ["Keys.LeftShift"], 882 | "description": "Represents the keyboard's 'Left Shift' key (160)." 883 | }, 884 | "Keys.RightShift": { 885 | "prefix": "Keys.RightShift", 886 | "body": ["Keys.RightShift"], 887 | "description": "Represents the keyboard's 'Right Shift' key (161)." 888 | }, 889 | "Keys.LeftControl": { 890 | "prefix": "Keys.LeftControl", 891 | "body": ["Keys.LeftControl"], 892 | "description": "Represents the keyboard's 'Left Control' key (162)." 893 | }, 894 | "Keys.RightControl": { 895 | "prefix": "Keys.RightControl", 896 | "body": ["Keys.RightControl"], 897 | "description": "Represents the keyboard's 'Right Control' key (163)." 898 | }, 899 | "Keys.LeftAlt": { 900 | "prefix": "Keys.LeftAlt", 901 | "body": ["Keys.LeftAlt"], 902 | "description": "Represents the keyboard's 'Left Alt' key (164)." 903 | }, 904 | "Keys.RightAlt": { 905 | "prefix": "Keys.RightAlt", 906 | "body": ["Keys.RightAlt"], 907 | "description": "Represents the keyboard's 'Right Alt' key (165)." 908 | }, 909 | "Keys.OemSemicolo": { 910 | "prefix": "Keys.OemSemicolo", 911 | "body": ["Keys.OemSemicolo"], 912 | "description": "Represents the keyboard's 'Semicolon' key (186)." 913 | }, 914 | "Keys.OemPlus": { 915 | "prefix": "Keys.OemPlus", 916 | "body": ["Keys.OemPlus"], 917 | "description": "Represents the keyboard's 'Plus' key (187)." 918 | }, 919 | "Keys.OemComma": { 920 | "prefix": "Keys.OemComma", 921 | "body": ["Keys.OemComma"], 922 | "description": "Represents the keyboard's 'Comma' key (188)." 923 | }, 924 | "Keys.OemMinus": { 925 | "prefix": "Keys.OemMinus", 926 | "body": ["Keys.OemMinus"], 927 | "description": "Represents the keyboard's 'Minus' key (189)." 928 | }, 929 | "Keys.OemPeriod": { 930 | "prefix": "Keys.OemPeriod", 931 | "body": ["Keys.OemPeriod"], 932 | "description": "Represents the keyboard's 'Period' key (190)." 933 | }, 934 | "Keys.OemQuestion": { 935 | "prefix": "Keys.OemQuestion", 936 | "body": ["Keys.OemQuestion"], 937 | "description": "Represents the keyboard's 'Question' key (191)." 938 | }, 939 | "Keys.OemTilde": { 940 | "prefix": "Keys.OemTilde", 941 | "body": ["Keys.OemTilde"], 942 | "description": "Represents the keyboard's 'Tilde' key (192)." 943 | }, 944 | "Keys.OemOpenBrackets": { 945 | "prefix": "Keys.OemOpenBrackets", 946 | "body": ["Keys.OemOpenBrackets"], 947 | "description": "Represents the keyboard's 'OpenBrackets' key (219)." 948 | }, 949 | "Keys.OemPipe": { 950 | "prefix": "Keys.OemPipe", 951 | "body": ["Keys.OemPipe"], 952 | "description": "Represents the keyboard's 'Pipe' key (220)." 953 | }, 954 | "Keys.OemCloseBrackets": { 955 | "prefix": "Keys.OemCloseBrackets", 956 | "body": ["Keys.OemCloseBrackets"], 957 | "description": "Represents the keyboard's 'CloseBrackets' key (221)." 958 | }, 959 | "Keys.OemQuotes": { 960 | "prefix": "Keys.OemQuotes", 961 | "body": ["Keys.OemQuotes"], 962 | "description": "Represents the keyboard's 'Quotes' key (222)." 963 | }, 964 | "Keys.OemBackslash": { 965 | "prefix": "Keys.OemBackslash", 966 | "body": ["Keys.OemBackslash"], 967 | "description": "Represents the keyboard's 'Backslash' key (226)." 968 | }, 969 | "Keys.OemClear": { 970 | "prefix": "Keys.OemClear", 971 | "body": ["Keys.OemClear"], 972 | "description": "Represents the keyboard's 'Clear' key (254).", 973 | "type": "method", 974 | "rightLabel": "PV8 Key" 975 | } 976 | } --------------------------------------------------------------------------------