{"id":13695321,"url":"https://github.com/rkusa/dcs-scratchpad","last_synced_at":"2025-04-04T16:15:46.315Z","repository":{"id":37773988,"uuid":"160737063","full_name":"rkusa/dcs-scratchpad","owner":"rkusa","description":"Resizable and movable DCS World ingame Scratchpad for quick notes - especially useful in VR.","archived":false,"fork":false,"pushed_at":"2024-12-13T00:04:45.000Z","size":243,"stargazers_count":187,"open_issues_count":2,"forks_count":33,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-03-28T15:09:31.166Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rkusa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-06T21:53:44.000Z","updated_at":"2025-02-19T01:32:57.000Z","dependencies_parsed_at":"2024-09-10T18:57:13.692Z","dependency_job_id":"42fddcae-d07d-452c-8540-fa37d27eb8f4","html_url":"https://github.com/rkusa/dcs-scratchpad","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkusa%2Fdcs-scratchpad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkusa%2Fdcs-scratchpad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkusa%2Fdcs-scratchpad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkusa%2Fdcs-scratchpad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rkusa","download_url":"https://codeload.github.com/rkusa/dcs-scratchpad/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208178,"owners_count":20901570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T18:00:21.216Z","updated_at":"2025-04-04T16:15:46.289Z","avatar_url":"https://github.com/rkusa.png","language":"Lua","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# DCS Scratchpad\n\nResizable and movable DCS World in-game Scratchpad for quick persistent notes - especially useful in VR.\n\n## Installation\n\nCopy the `Scripts` folder into your DCS Saved games folder.\n\n## Usage\n\n- Toggle the scratchpad with `CTRL+Shift+X`\n- Use `Esc` to remove the text field focus, but keep the scratchpad open\n\n## Settings\n\nSome settings can be changed in your DCS saved games folder under `Config/ScratchpadConfig.lua` (if the file does not exist, start DCS once after mod installation):\n\n- `hotkey` hotkey to toggle the Scratchpad (`CTRL+Shift+X` by default) ¹\n- `hotkeyNextPage` hotkey to switch to the next page (not set by default) ¹\n- `hotkeyPrevPage` hotkey to switch to the next page (not set by default) ¹\n- `hotkeyInsertCoordinates` hotkey to add coordinates from the F10 map (not set by default) ¹\n- `hotkeyReloadPages` hotkey to reload all pages from disk (useful if they were modified by other tools; not set by default) ¹\n- `fontSize` increase or decrease the font size of the Scratchpads textarea (`14` by default)\n\n_¹ check `DCS World\\dxgui\\bind\\KeyNames.txt` to find how to reference a key; only the keys can be used, that work without having to press `Shift` - so `(` cannot be used, but `Shift+9` can_\n\n## Scratchpad Content\n\nThe Scratchpads content is persisted into `Scratchpad\\0000.txt` (in your saved games folder; if the file does not exist, start DCS once after mod installation/upgrade). You can also change the file in your favorite text editor before starting DCS.\n\n### Multiple Pages\n\nWhen DCS starts, the Scratchpad looks for all text files inside the `Scratchpad\\` directory (in your DCS saved games folder that do not exceed a file size of 1MB). If there is more than one, it will show buttons (←/→) that can be used to switch between all those text files. The file `Scratchpad\\0000.txt`, where the content is persisted into by default, can be freely renamed, it is _not_ necessary to use the `000x` naming scheme.\n\n## Insert Coordinates from F10 map\n\nThis is only available in single player or for servers that have _Allow Player Export_ enabled. If available, you'll have a checkbox at the bottom for the Scratchpad. The mode to insert coordinates is active while the checkbox is checked. While active, you'll have a white dot in the center of your screen and an additional `+ L/L` button below the text area of the Scratchpad. Open the F10 map and align the white dot with your location of interest and hit the `+ L/L` button. This will add the coordinates of the location below the white cursor to your Scratchpad.\n\n## Extensions\n\nScratchpad supports extensions. Most prominent use-case is to add a virtual keyboard. There are some example extensions in `Saved Games\\DCS.openbeta\\Scripts\\Scratchpad\\Extensions\\Disabled\\`. To\nenable any of them, copy the file over to `Saved Games\\DCS.openbeta\\Scripts\\Scratchpad\\Extensions\\`.\n\nThe available APIs to the extensions are:\n\n```lua\n-- Log to `Saved Games\\DCS.openbeta\\Logs\\Scratchpad.log`\nlog(text)\n\n-- Format coordinates with `format` being either `DMS` or `DDM`, `isLat` `true` if the provided `d`\n-- is the latitude, and `false` if it is the longitude, and `opts` allow to fine-tune the format\n-- (checkout `Scripts/Hooks/scratchpad-hook.lua` `function coordsType()` for examples).\nformatCoord(format, isLat, d, opts)\n\n-- Add a `listener` that is executed every time the user adds a coordinate (via the +L/L button).\n-- See `Extensions/Disabled/ns430.lua` for an example.\naddCoordinateListener(listener(text, lat, lon, alt))\n\n-- Add a button positioned at `left`/`top` (relative to the plugin's container), with the size of\n-- `width`/`height`, the given `title` and the `onClick` callback that is executed when the button\n-- is pressed.\naddButton(left, top, width, height, title, onClick(text))\n\n-- The `text` given to the `addCoordinateListener` and `onClick` callbacks can be mutated with the\n-- following methods:\n  text:getText()\n  text:setText(text)\n  text:insertAtCursor(text)\n  text:insertBelowCursor(text)\n  text:insertTop(text)\n  text:insertBottom(text)\n```\n\n## Kudos\n\n- to [DCS-SimpleRadioStandalone](https://github.com/ciribob/DCS-SimpleRadioStandalone) which acted as a good reference of how to setup a simple window in DCS\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frkusa%2Fdcs-scratchpad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frkusa%2Fdcs-scratchpad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frkusa%2Fdcs-scratchpad/lists"}