{"id":50607845,"url":"https://github.com/misohena/el-vkbd","last_synced_at":"2026-06-06T00:31:26.066Z","repository":{"id":324850137,"uuid":"1098214811","full_name":"misohena/el-vkbd","owner":"misohena","description":"A software keyboard implemented in Emacs Lisp that runs inside Emacs.","archived":false,"fork":false,"pushed_at":"2025-12-05T12:14:58.000Z","size":617,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-06T11:51:57.670Z","etag":null,"topics":["emacs","emacs-lisp","onscreen-keyboard","virtual-keyboard"],"latest_commit_sha":null,"homepage":"https://misohena.jp/blog/2025-12-05-emacs-virtual-keyboard.html","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/misohena.png","metadata":{"files":{"readme":"README.org","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-17T12:04:20.000Z","updated_at":"2025-12-05T12:15:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/misohena/el-vkbd","commit_stats":null,"previous_names":["misohena/el-vkbd"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/misohena/el-vkbd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misohena%2Fel-vkbd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misohena%2Fel-vkbd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misohena%2Fel-vkbd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misohena%2Fel-vkbd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/misohena","download_url":"https://codeload.github.com/misohena/el-vkbd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misohena%2Fel-vkbd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33965591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["emacs","emacs-lisp","onscreen-keyboard","virtual-keyboard"],"created_at":"2026-06-06T00:31:25.448Z","updated_at":"2026-06-06T00:31:26.059Z","avatar_url":"https://github.com/misohena.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+TITLE: Emacs Virtual Keyboard\n\nThis Emacs Lisp library displays a virtual keyboard (also known as an on-screen keyboard or software keyboard) within Emacs.\n\n* Screenshots\n\nThe following image is a screenshot of Emacs for Android (Native App).\n\n[[file:./screenshot/android-screen.png]]\n\nThe keyboard displayed above is the virtual keyboard created by this library.\n\nTapping the keyboard icon in the toolbar toggles the display of this virtual keyboard.\n\nBy the way, at the bottom is the flick input panel from ATOK, a Japanese IME app. While it's possible to switch to a full keyboard like Hacker's Keyboard, flick input is better for Japanese typing and switching between keyboards is cumbersome. So I created this library to display both simultaneously.\n\n** Other Screenshots\n\nDisplay only special keys and use alongside the existing on-screen keyboard:\n\n[[file:./screenshot/compact-layout.png]]\n\nDisable the native on-screen keyboard and use only vkbd:\n\n[[file:./screenshot/vkbd-only.png]]\n\nDisplay in a child frame (not very user-friendly):\n\n[[file:./screenshot/child-frame.png]]\n\nKeyboard menu:\n\n[[file:./screenshot/keyboard-menu.png]]\n\nThe buttons in the title bar are, from left to right: close, menu, switch to 10x7 layout, switch to special-keys-only layout, and toggle native on-screen keyboard disable (Android only). Of course, these are customizable:\n\n[[file:./screenshot/title-bar.png]]\n\nOf course, it can also be used in desktop environments:\n\n[[file:./screenshot/mswindows-screen.png]]\n\n* Requirements\n\n- Emacs 30.1 or later\n- Graphics display environment\n\n* Usage\n\nPlace the .el files of this library in a location on your load-path.\n\nTo display the virtual keyboard, load vkbd.el and type:\n\n: M-x vkbd-open-global-keyboard\n\nTo add a button to toggle the keyboard to the toolbar, add the following code to your init.el:\n\n#+begin_src elisp\n(autoload 'vkbd-tool-bar-mode \"vkbd-tool-bar\" nil t)\n(vkbd-tool-bar-mode)\n#+end_src\n\nOr simply type:\n\n: M-x vkbd-tool-bar-mode\n\n* Layouts\n\nThe following keyboard layouts are provided as presets. You can also create new layouts.\n\n** vkbd-layout-10x9\n\n[[file:screenshot/layout-10x9.png]]\n\nLimited to 10 columns wide, it can be comfortably operated even on vertically-oriented displays like smartphones. All ASCII symbols can be entered without shift.\n\n** vkbd-layout-10x7\n\n[[file:screenshot/layout-10x7.png]]\n\nBased on vkbd-layout-10x9, reduced to 7 rows. Most symbols require shift to enter, but some can be entered without shift. Also, Ins and Del keys are omitted.\n\n** vkbd-layout-11x7\n\n[[file:screenshot/layout-11x7.png]]\n\nBased on =vkbd-layout-10x7= with one additional column. Allows entering more symbols without shift while maintaining compactness.\n\n** vkbd-layout-us\n\n[[file:screenshot/layout-us.png]]\n\nUS keyboard-like layout. The width is wide, so it may not fit within the parent frame without size adjustment.\n\n** vkbd-layout-jp\n\n[[file:screenshot/layout-jp.png]]\n\nJapanese keyboard-like layout. The width is wide, so it may not fit within the parent frame without size adjustment.\n\n** vkbd-layout-special-keys-only\n\n[[file:screenshot/layout-special-keys-only.png]]\n\nLayout containing only special keys, intended for use with existing keyboards.\n\nNote: The modifier lock feature does not work correctly when used with existing keyboards.\n\n* Customization\n\nType M-x customize-group vkbd\n\n** Customization Variables and Faces\n\nGlobal keyboard settings:\n- =vkbd-global-keyboard-options= : Settings applied only to the global keyboard object (You can see the available properties with =M-x customize-variable vkbd-global-keyboard-options=)\n- =vkbd-global-keyboard-user-data-storage= : Storage location for user data (such as frame position) applied only to the global keyboard\n\nLayout settings::\n- =vkbd-layout-list= : All layout list\n- =vkbd-default-keyboard-layout= : Default layout\n- =vkbd-user-key-type-alist= : Alist of user-defined key types\n- =vkbd-user-key-text-alist= : Alist of display strings for key types\n\nText style settings:\n- Variables:\n  - =vkbd-text-key-width= : Key width (in characters)\n  - =vkbd-text-key-line-height= : Key line's line-height text property\n  - =vkbd-text-key-raise= : Vertical position of characters\n  - =vkbd-text-key-centering-method= : Text centering method\n  - =vkbd-text-column-separator-width= : Width of spacing between columns (horizontal spacing between keys)\n  - =vkbd-text-row-separator-height= : Height of spacing between rows (vertical spacing between keys)\n  - =vkbd-keyboard-buffer-line-spacing= : =line-spacing= value in keyboard buffers\n  - =vkbd-text-title-button-separator-width= : Width of spacing between buttons on the title bar (horizontal spacing between buttons)\n- Faces\n  - =vkbd-text-keyboard= : Entire keyboard\n  - =vkbd-text-key-common= : Key area\n  - =vkbd-text-key= : Normal key\n  - =vkbd-text-key-pressed= : Pressed key\n  - =vkbd-text-key-locked= : Locked key\n  - =vkbd-text-key-invisible= : Invisible key (used to adjust key positions)\n  - =vkbd-text-column-separator= : Spacing between columns (horizontal)\n  - =vkbd-text-row-separator= : Spacing between rows (vertical)\n  - =vkbd-text-title-bar= : Entire title bar\n  - =vkbd-text-title-button= : Title bar buttons\n  - =vkbd-text-title-button-separator= : Spacing between buttons (horizontal)\n  - =vkbd-text-title-caption= : Title bar text\n\nTitle bar:\n  - =vkbd-title-bar-format=\n  - =vkbd-title-button-close-caption=\n  - =vkbd-title-button-close-format=\n  - =vkbd-title-button-menu-caption=\n  - =vkbd-title-button-menu-format=\n  - =vkbd-title-button-extras=\n\nKey repeat:\n  - =vkbd-key-repeat-enabled=\n  - =vkbd-key-repeat-delay=\n  - =vkbd-key-repeat-interval=\n\nFrame settings:\n- =vkbd-keyboard-frame-parameters= : Frame parameters (note that changes may not be immediately reflected due to frame reuse)\n- =vkbd-recycle-frames= : Whether to pool and reuse frames (you can delete all pooled frames with M-x vkbd-delete-all-unused-frames)\n- =vkbd-keyboard-frame-keep-visible-margins= : Margins to keep visible when dragging the virtual keyboard frame\n\nBuffer settings:\n- =vkbd-keyboard-buffer-local-variables= : Buffer local constant variables\n\nStyle settings:\n- =vkbd-default-keyboard-style= (currently only text01 style is available)\n\nInput mechanisms:\n  - =vkbd-replace-read-functions=\n\n** How to Adjust Size\n\nThe easiest way to adjust the overall keyboard height is to change the\n:height of the =vkbd-text-keyboard= face.You can also change the font\nparameter in =vkbd-keyboard-frame-parameters=.\n\nTo change only the key height without changing the text size on the keys, adjust\nthe :height of =vkbd-text-column-separator= or =vkbd-text-key-line-height= variable.\n\n** Change key text\n\n#+begin_src elisp\n(setq vkbd-user-key-text-alist\n      '((up . \"^\") (lft . \"\u003c-\") (rit . \"-\u003e\") (dwn . \"v\")\n        (ctl . \"Ctl\") (shf . \"Shift\") (met . \"Meta\")\n        (C- . \"Ctl\") (S- . \"Shift\") (M- . \"Meta\")))\n#+end_src\n\n* Replacing the On-Screen Keyboard\n\nStarting with Emacs 30, a mechanism to control on-screen keyboards has been added to Emacs.\n\n[[https://www.gnu.org/software/emacs/manual/html_node/elisp/On_002dScreen-Keyboards.html][On-Screen Keyboards (GNU Emacs Lisp Reference Manual)]]\n\nvkbd.el allows you to either use vkbd alongside the native on-screen keyboard or use vkbd exclusively.\n\nThe =vkbd-toggle-native-osk= command can be used to disable the native on-screen keyboard. When running on Android, this command is added as a button on vkbd's title bar.\n\nIf you want to replace the native on-screen keyboard with vkbd, you can use the global minor mode =vkbd-replace-osk-mode=. Emacs has a feature that automatically displays the on-screen keyboard when an editable area is touched, and with this mode enabled, =vkbd-open-global-keyboard= is executed instead of showing the native on-screen keyboard.\n\n* Using from Emacs Lisp\n\nYou can create multiple keyboards with arbitrary settings from Emacs Lisp using code like this:\n\n#+begin_src elisp\n(setq my-keyboard\n      (vkbd-make-keyboard\n       '(:title\n         \"My ABCDE Keyboard\"\n         :layout ((?a ?b ?c ?d ?e)\n                  (?A ?B ?C ?D ?E))\n         :title-extra-buttons nil)))\n\n(vkbd-keyboard-live-p my-keyboard) ;; =\u003e t\n\n(vkbd-delete-keyboard my-keyboard)\n#+end_src\n\n* Limitations\n\nThere are several known situations where this library's virtual keyboard does not work properly.\n\nWhen using frame display mode for the virtual keyboard, input acceptance may be interrupted or input may not work correctly due to frame switching events. Such issues have been observed with transient.el (Magit, etc.) and set-transient-map (text-scale-adjust, etc.). Window display mode is less prone to malfunctions caused by focus switching.\n\nWhen using window display mode, the virtual keyboard may be hidden by other side windows, making input impossible. For example, which-key-mode and transient.el (Magit, etc.) display side windows at the bottom of the frame by default. If this library's virtual keyboard is also displayed in a side window at the bottom, they will try to occupy the same location, causing the keyboard to be partially or completely hidden and potentially preventing input. When using window display mode, it may be better to set the side window position to the top.\n\nThere are likely other problematic cases as well. In some situations, key input may not be accepted and you may become unable to escape from that situation.\n\nOn Android, quickly pressing the volume down button twice will trigger a quit. Please remember this.\n\n* License\n\nThis software is licensed under GPLv3. You are free to use, modify and distribute this software.\n\nThis is a small token of appreciation for Emacs, the wonderful software that I've been able to use freely. Regarding Emacs-related work, I have no intention of asserting copyright in a restrictive way. Feel free to use it however you like-or don't use it at all but reference the code, borrow ideas, or just let it inspire you in some way. I simply hope it contributes to making Emacs more useful for everyone.\n\nIf you wish to register this software in any package archive, please fork this repository, make the necessary modifications to fit the package archive's requirements, and submit the registration on your own. Also continue with the necessary maintenance. You don't need my permission.\n\nI also welcome you to publish your improved version. If that works better than mine, I might start using it too. I may suddenly be unable to develop, and I cannot guarantee any continued development. This software is the result of what I want, so please add what you want yourself.\n\nI am not proficient in English, so please do not expect continuous communication in English. I have spent a long time using translation software to write this text, but I am not confident that the intended meaning is accurately conveyed. I don't think it has ended up with the opposite meaning, but subtle nuances may be missing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisohena%2Fel-vkbd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmisohena%2Fel-vkbd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisohena%2Fel-vkbd/lists"}