{"id":20131304,"url":"https://github.com/qzed/linux-surface-pen-button-remap","last_synced_at":"2025-04-09T16:40:39.719Z","repository":{"id":100517937,"uuid":"185467346","full_name":"qzed/linux-surface-pen-button-remap","owner":"qzed","description":"Remapper for the Bluetooth (Eraser) Button of the Surface Pen (Work in Progress).","archived":false,"fork":false,"pushed_at":"2023-06-24T22:23:02.000Z","size":37,"stargazers_count":16,"open_issues_count":5,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-23T18:52:10.734Z","etag":null,"topics":["linux","linux-surface"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/qzed.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-07T19:41:57.000Z","updated_at":"2025-03-16T08:46:13.000Z","dependencies_parsed_at":"2024-11-13T20:47:31.562Z","dependency_job_id":null,"html_url":"https://github.com/qzed/linux-surface-pen-button-remap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qzed%2Flinux-surface-pen-button-remap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qzed%2Flinux-surface-pen-button-remap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qzed%2Flinux-surface-pen-button-remap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qzed%2Flinux-surface-pen-button-remap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qzed","download_url":"https://codeload.github.com/qzed/linux-surface-pen-button-remap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248068882,"owners_count":21042574,"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":["linux","linux-surface"],"created_at":"2024-11-13T20:47:29.834Z","updated_at":"2025-04-09T16:40:39.714Z","avatar_url":"https://github.com/qzed.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Remapper for the Bluetooth (Eraser) Button of the Surface Pen\n\nWork in progress.\n\nThe Surface Pen bluetooth-button can distinguish between three actions, which are reported as key events:\n\n- Single-click (\u003ckbd\u003e⌘ Meta\u003c/kbd\u003e+\u003ckbd\u003eF20\u003c/kbd\u003e).\n- Double-click (\u003ckbd\u003e⌘ Meta\u003c/kbd\u003e+\u003ckbd\u003eF19\u003c/kbd\u003e).\n- Press and hold (\u003ckbd\u003e⌘ Meta\u003c/kbd\u003e+\u003ckbd\u003eF18\u003c/kbd\u003e).\n\nThis utility allows you to re-map these actions via evedev/uinput so that they can be used e.g. in presentation tools that do not allow custom keyboard shortcuts or have trouble handling the meta key.\nFor more hardware-details, have a look at the [official Windows specification page][windows-spec].\n\n[windows-spec]: https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-designs#bluetooth-button-implimentation\n\n### Configure\n\n\n\nIf you are configuring before installation: Open the file `remap.conf` in the folder `etc` and edit it:\n\nIf you are configuring after installation: Open the file `remap.conf` in the folder `/etc/surface-pen-button/` and edit it:\n\u003e The content of this file is toml syntax so keys are simple strings and actions are arrays of strings.\n1) Change `vendor` if neccessary. You can check the vendor id of your pen by using `sudo evtest` and then selecting `Surface Pen Keyboard`. You'll find you vendor id at `Input device ID` after `vendor`.\n2) Change `product` if neccessary. You can check the product id of your pen by using `sudo evtest` and then selecting `Surface Pen Keyboard`. You'll find you product id at `Input device ID` after `product`.\n3) Change the key combinations for the actions. You have to put the keys in quotation marks (e. g. \"KEY_ESC\"). If you want multiple keys, you have to put a comma (, ) between them.\n\u003cdetails\u003e \u003csummary\u003e Available keys: \u003c/summary\u003e\n  \n```\nKEY_ESC\nKEY_1\nKEY_2\nKEY_3\nKEY_4\nKEY_5\nKEY_6\nKEY_7\nKEY_8\nKEY_9\nKEY_0\nKEY_MINUS\nKEY_EQUAL\nKEY_BACKSPACE\nKEY_TAB\nKEY_Q\nKEY_W\nKEY_E\nKEY_R\nKEY_T\nKEY_Y\nKEY_U\nKEY_I\nKEY_O\nKEY_P\nKEY_LEFTBRACE\nKEY_RIGHTBRACE\nKEY_ENTER\nKEY_LEFTCTRL\nKEY_A\nKEY_S\nKEY_D\nKEY_F\nKEY_G\nKEY_H\nKEY_J\nKEY_K\nKEY_L\nKEY_SEMICOLON\nKEY_APOSTROPHE\nKEY_GRAVE\nKEY_LEFTSHIFT\nKEY_BACKSLASH\nKEY_Z\nKEY_X\nKEY_C\nKEY_V\nKEY_B\nKEY_N\nKEY_M\nKEY_COMMA\nKEY_DOT\nKEY_SLASH\nKEY_RIGHTSHIFT\nKEY_KPASTERISK\nKEY_LEFTALT\nKEY_SPACE\nKEY_CAPSLOCK\nKEY_F1\nKEY_F2\nKEY_F3\nKEY_F4\nKEY_F5\nKEY_F6\nKEY_F7\nKEY_F8\nKEY_F9\nKEY_F10\nKEY_NUMLOCK\nKEY_SCROLLLOCK\nKEY_KP7\nKEY_KP8\nKEY_KP9\nKEY_KPMINUS\nKEY_KP4\nKEY_KP5\nKEY_KP6\nKEY_KPPLUS\nKEY_KP1\nKEY_KP2\nKEY_KP3\nKEY_KP0\nKEY_KPDOT\nKEY_102ND\nKEY_F11\nKEY_F12\nKEY_KPENTER\nKEY_RIGHTCTRL\nKEY_KPSLASH\nKEY_SYSRQ\nKEY_RIGHTALT\nKEY_HOME\nKEY_UP\nKEY_PAGEUP\nKEY_LEFT\nKEY_RIGHT\nKEY_END\nKEY_DOWN\nKEY_PAGEDOWN\nKEY_INSERT\nKEY_DELETE\nKEY_POWER\nKEY_KPEQUAL\nKEY_PAUSE\nKEY_LEFTMETA\nKEY_RIGHTMETA\nKEY_COMPOSE\nKEY_F13\nKEY_F14\nKEY_F15\nKEY_F16\nKEY_F17\nKEY_F18\nKEY_F19\nKEY_F20\n```\n\n\u003c/details\u003e\n\n4) If you are configuring after installation: Stop this program via `sudo killall surface-pen-button`. If you have installed the systemd service, the program will start again after 2 seconds.\n  \n\n### Install\n\nRun `./install.sh` in this repository, then follow the instructions.\n\n### Uninstall\n\nRun `./uninstall.sh` in this repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqzed%2Flinux-surface-pen-button-remap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqzed%2Flinux-surface-pen-button-remap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqzed%2Flinux-surface-pen-button-remap/lists"}