{"id":18668217,"url":"https://github.com/funnyboy-roks/ps2-interface","last_synced_at":"2026-05-02T02:32:26.826Z","repository":{"id":186943183,"uuid":"676030973","full_name":"funnyboy-roks/ps2-interface","owner":"funnyboy-roks","description":"A simple host interface for a PS/2 keyboard","archived":false,"fork":false,"pushed_at":"2023-08-09T21:28:44.000Z","size":78,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-18T07:39:03.699Z","etag":null,"topics":["arduino","embedded-rust","ps2-keyboard"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/funnyboy-roks.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":"2023-08-08T09:21:26.000Z","updated_at":"2023-08-08T22:22:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c589442-c0c2-4919-9d72-d2b63063ecad","html_url":"https://github.com/funnyboy-roks/ps2-interface","commit_stats":null,"previous_names":["funnyboy-roks/ps2-interface"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/funnyboy-roks/ps2-interface","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyboy-roks%2Fps2-interface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyboy-roks%2Fps2-interface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyboy-roks%2Fps2-interface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyboy-roks%2Fps2-interface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/funnyboy-roks","download_url":"https://codeload.github.com/funnyboy-roks/ps2-interface/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyboy-roks%2Fps2-interface/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32520845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"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":["arduino","embedded-rust","ps2-keyboard"],"created_at":"2024-11-07T08:41:56.236Z","updated_at":"2026-05-02T02:32:26.809Z","avatar_url":"https://github.com/funnyboy-roks.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PS/2 Interface\n\nThis a very simple PS/2 interface that I made just because I can.\n\nCurrently, it handles receiving bytes from the keyboard, though it\ndoesn't actually verify start/end bits properly since my keyboard doesn't\nactually send the stop bit as a `1`?\n\nIt translates the scan codes into characters and prints them to the\nserial monitor.\n\nL/R Shift, L/R Ctrl, L/R Mod, L/R Alt are handled via a bitset and checked\nwhen a keystroke is sent to be used for translation into text Shift\ntranslates the keys to upper case or the key that is mapped on the\nkeyboard (i.e. `;` -\u003e `:`).  Ctrl/Mod/Alt are translated into `\u003cC-?\u003e`,\n`\u003cS-?\u003e`, `\u003cM-?\u003e`, respectively, where `?` is replaced with the character\npressed (i.e. `Ctrl + b` -\u003e `\u003cC-b\u003e`).\n\n## Circuit\n\nThe circuit is very simple, since hardware is connected directly to the\nArduino.\n\n![circuit](./circuit.png)\n\nThe only note that I have regarding the circuit is that the Keyboard's\nPS/2 power is plugged directly into an Arduino output so we can turn it\non manually and see any startup output.  This also helps since PS/2 is\nnot officially hot-swappable.\n\n## Future\n\nThis is only a small personal project, so I'll probably never finish\nthese things:\n\n- [ ] Host -\u003e Keyboard Communication\n    - I've got a basic implementation, but it doesn't seem to be happy\n      and never sends the ACK bit or clocks.  This may be because I\n      have a _very_ cheap keyboard (8 USD on ebay) and it just doesn't\n      work, or I'm doing something wrong.  (I'm leaning towards the\n      latter)\n    - [This page](http://www.burtonsys.com/ps2_chapweske.htm) has some\n      very detailed information oh how the protocol should work, and\n      I've implemented it as far as I can tell, though still no luck.\n      It states that the host is supposed to time out at some point, but\n      I've not implemented this functionality yet, so it just freezes.\n- [ ] Caps/Scroll/Num lock\n    - I'm waiting on fixing the above one before I do this, so that I\n      can turn on the lights (:\n\n## References\n\nI heavily relied on a few different sites for information about the PS/2\nspec and other aspects of this implementation.\n\n- http://www.burtonsys.com/ps2_chapweske.htm\n- http://www1.cs.columbia.edu/~sedwards/classes/2011/4840/ps2-keyboard.pdf\n- https://wiki.osdev.org/PS/2_Keyboard\n- https://www.networktechinc.com/ps2-prots.html\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunnyboy-roks%2Fps2-interface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffunnyboy-roks%2Fps2-interface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunnyboy-roks%2Fps2-interface/lists"}