{"id":15724490,"url":"https://github.com/knuxify/keyboardswipe","last_synced_at":"2026-01-08T16:36:47.449Z","repository":{"id":139954288,"uuid":"165701023","full_name":"knuxify/KeyboardSwipe","owner":"knuxify","description":"An easy to use cipher, optimized for keyboard users.","archived":false,"fork":false,"pushed_at":"2019-02-04T21:09:32.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-28T20:55:24.302Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/knuxify.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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-01-14T17:06:48.000Z","updated_at":"2019-02-04T21:09:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"c92f105c-ae5a-46dc-9446-aea45fcfe7fc","html_url":"https://github.com/knuxify/KeyboardSwipe","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/knuxify%2FKeyboardSwipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knuxify%2FKeyboardSwipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knuxify%2FKeyboardSwipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knuxify%2FKeyboardSwipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knuxify","download_url":"https://codeload.github.com/knuxify/KeyboardSwipe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246399798,"owners_count":20770908,"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-10-03T22:16:49.888Z","updated_at":"2026-01-08T16:36:47.389Z","avatar_url":"https://github.com/knuxify.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Keyboard Swipe Cipher\n\n## Introduction\n\nThe Keyboard Swipe (KS) cipher is a cipher designed for use with computers and other devices with a keyboard. It only supports letters (unless otherwise specified) and is based off of the QWERTYUIOP keyboard layout. \\\n**IMPORTANT:** Do NOT use this cipher for storing sensitive data, such as passwords.\n\n## General overview\n\nKeyboard Swipe Cipher - KS\n\nUsage: `KS[n][d][m] (--switches)`\n\n**n** - number of keys to shift by (max. 6)\\\n**d** - direction to shift in (R/L/S)\\\n**m** - encoding/decoding mode, optional, defaults to D (D/F/B)\n\n**--switches** - any switch (explained in Advanced techniques)\n\nTo decode, take the letter that you want to decode, and replace it with the letter that's `n` places away in the `d` direction. In case the row is over, use the mode to decide what to do next:\n\n**D (default)** - jump back to the beggining of this row.\\\n**F (fall)** - go to the beggiing of the next row (if therre is no row below, go back to the beggining of the first row).\\\n**B (bounce)** -- reverse the direction (L to R, R to L). \n\n## Understanding Keyboard Swipe\n\n### The naming system\n\nCiphers like ROT have naming systems that allow them to be expressed in a more understandable way. For example, ROT13 consists of two parts: the cipher name (ROT) and the amount of rotations (13). \\\nKeyboard Swipe works in a simmilar fashion. Let's say we found some text encoded in the Keyboard Swipe format, and we need to decode it. Typically, there's a hint on the top: a name. We have a document that looks like this:\n\n```md\nKS3RF\nLyccs tsuch!\n```\n\nFrom this, we know that the cipher is KS3RF. Let's break this down.\n\n**KS** - Short for **K**eyboard **S**wipe. Appears on the beggining of each KS cipher hint. \\\n**3 [n]** - The number of keys to shift by. The reccomended maximum is 6, as it allows all rows to be encoded. \\\n**R [d]** - The direction for the swipe. Can be R (right), L (left) and S (switch, explained later). \\\n**F [m]** - The encoding mode. This can be left out, and defaults to D (default). The other options are F (fall) and B (bounce). We will explain modes more in-depth shortly.\n\nWith this information, we now know that we have to shift by 3 keys to the right, with the fall mode.\n\n### Decoding and encoding (and modes)\n\nThe basic principle of KS is that a letter is moved `n` times in the `d` direction. For example, if we were to encode the letter \"Q\" in KS3R, we would have to do the following:\n\nFirst, we assign the number 0 to the letter we want to encode. This means that in our case, `0` will be `Q`. Then, every time we move in the `d` direction, we add 1 to that number, and assign it to the letter we're on. In our case, we will end up with this:\n\n```html\nQ - 0 \u003c\u003c WE BEGIN HERE \u003e\u003e\nW - 1\nE - 2\nR - 3 \u003c\u003c THIS IS OUR RESULT \u003e\u003e\n```\n\nNow let's encode the letter I, also in KS3R. We go through our usual process, but encounter a problem:\n\n```html\nI - 0 \u003c\u003c WE BEGIN HERE \u003e\u003e\nO - 1\nP - 2\n??? - 3 \u003c\u003c HOUSTON, WE HAVE A PROBLEM \u003e\u003e\n```\n\nWe are no longer in the same row of letters (mind you, KS is letter-only). This is where the **encoding/decoding modes** come in.\n\n#### Encoding/decoding modes\n\nIn the D (default) mode, if we reach the end of a row, we jump back to the beggining of the row. Thus, if `P - 2`, then `Q - 3`, as we jumped back to the beggining.\n\nIn the F (fall) mode, we go to the beggining of the row below us. If there are no more rows below, we jump back to the first row (QWERTY...). Thus, if ``P - 2`` and the row below begins on A, then ``A - 3``.\n\nIn the B (bounce) mode, we bounce off of the edge, thus, we now go in the opposite direction. In this case, since we have reached the end (`P`), we now go to `O` (so ``O - 3``).\n\n___\n\nGoing back to our encrypted sentence (which, in case you forgot, is 'Lyccs tsuch!', encoded in KS3RF), we can see that we will have to use the F (fall) mode while decoding.\n\n```html\nL - H\ny - e\nc - l\ns - o\n...and so on...\n```\n\nIn the end, we get the sentence \"Hello world!\". How nice!\n\n## Advanced techniques\n\nThis isn't all that KS can offer. There are some more advanced functions, but they are mostly experimental.\n\n### Switches\n\nSwitches can be used to modify the ruleset. For now, there are only 3 switches:\n\n**--numbers** or **-n** - applies the encoding to numbers.\\\n**--special** or **-s** - applies the encoding to special \\characters (like ',', ':' etc.)\n**--apply-all** or **-a** - combines the two above.\n\n### S (switch) direction\n\nThis is a purely experimental direction and isn't guaranteed to work well. This direction switches the direction on every character (except for special charcters and spaces).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknuxify%2Fkeyboardswipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknuxify%2Fkeyboardswipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknuxify%2Fkeyboardswipe/lists"}