https://github.com/orhun/daktilo Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} orhun / daktilo Public * * Notifications * Fork 8 * Star 336 Turn your keyboard into a typewriter! daktilo.cli.rs/ License Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT 336 stars 8 forks Activity Star Notifications * Code * Issues 9 * Pull requests 0 * Actions * Security * Insights More * Code * Issues * Pull requests * Actions * Security * Insights orhun/daktilo This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 1 branch 2 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/o] Use Git or checkout with SVN using the web URL. [gh repo clone orhun/] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @madhur @mergify madhur and mergify[bot] docs(readme): use case sensitive regex in example (#21) ... b296348 Oct 4, 2023 docs(readme): use case sensitive regex in example (#21) Signed-off-by: Madhur Ahuja Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> b296348 Git stats * 103 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github chore(deps): bump actions/upload-pages-artifact from 1 to 2 (#20) October 2, 2023 20:36 assets docs(readme): update demo October 2, 2023 14:03 config feat(config): add drumkit preset (#18) October 3, 2023 19:40 sounds feat(config): add drumkit preset (#18) October 3, 2023 19:40 src test(audio): gate audio tests behind a feature flag October 1, 2023 21:05 wix feat(release): integrate cargo-dist (#9) September 29, 2023 19:12 .editorconfig style(format): add .editorconfig September 26, 2023 13:44 .gitignore chore(git): update .gitignore September 28, 2023 21:23 CHANGELOG.md chore: release v0.1.0-alpha.0 (#10) September 30, 2023 22:20 CNAME chore(github): add CNAME record September 26, 2023 13:55 CODE_OF_CONDUCT.md docs(github): add code of conduct September 28, 2023 20:49 CONTRIBUTING.md docs(contributing): add 'how to add new presets' guide October 3, 2023 20:32 Cargo.lock chore(deps): bump toml from 0.8.1 to 0.8.2 (#25) October 3, 2023 21:11 Cargo.toml chore(deps): bump toml from 0.8.1 to 0.8.2 (#25) October 3, 2023 21:11 LICENSE-APACHE docs(license): license the code under MIT + Apache 2.0 September 24, 2023 17:51 LICENSE-MIT docs(license): license the code under MIT + Apache 2.0 September 24, 2023 17:51 README.md docs(readme): use case sensitive regex in example (#21) October 4, 2023 00:45 RELEASE.md docs(release): document the release process September 30, 2023 23:06 SECURITY.md docs(github): add security policy September 28, 2023 20:49 _config.yml chore(website): deploy using GitHub Actions September 30, 2023 22:54 cliff.toml chore: release v0.1.0-alpha.0 (#10) September 30, 2023 22:20 committed.toml feat(ci): integrate more tools for linting September 26, 2023 13:29 deny.toml chore(deny): allow Zlib license September 30, 2023 21:45 release-plz.toml chore(release): update dependencies on release September 29, 2023 17:48 rustfmt.toml feat(ci): integrate more tools for linting September 26, 2023 13:29 typos.toml chore(typos): add typos config October 3, 2023 20:51 View code [ ] Turn your keyboard into a typewriter! Getting Started Supported Platforms Installation Cargo Arch Linux Alpine Linux Binary releases Build from source Usage Configuration Adding custom presets Similar Projects Acknowledgements Donations Contributing License Copyright README.md [daktilo-logo] Turn your keyboard into a typewriter! GitHub Release Crate Release Coverage Continuous Integration Continuous Deployment Documentation daktilo-demo.mp4 daktilo ("typewriter" in Turkish, pronounced "duck-til-oh", derived from the Ancient Greek word daktulos for "finger") is a small command-line program that plays typewriter sounds every time you press a key. It also offers the flexibility to customize keypress sounds to your liking. You can use the built-in sound presets to create an enjoyable typing experience, whether you're crafting emails or up to some prank on your boss. Inspiration: "Taking notes in class with my typewriter" Now you can recreate this moment without the actual need for a physical typewriter! Table of Contents * Getting Started * Supported Platforms * Installation + Cargo + Arch Linux + Alpine Linux + Binary releases + Build from source * Usage * Configuration + Adding custom presets * Similar Projects * Acknowledgements * Donations * Contributing * License * Copyright Getting Started Simply run daktilo for the classic typewriter effect. There are also different presets available: Preset Name Description default the classic typewriter effect basic an alternative and more basic typewriter effect musicbox plays random notes like a music box ducktilo quack quack drumkit dum, tss, cha! To list the presets: daktilo --list To use a preset: daktilo --preset musicbox Supported Platforms * [*] Linux + [*] X11 + [ ] Wayland* * [*] Windows * [*] MacOS Installation Packaging status Packaging status Cargo daktilo can be installed from crates.io: cargo install daktilo The minimum supported Rust version is 1.70.0. Arch Linux daktilo can be installed from the official repositories using pacman: pacman -S daktilo Alpine Linux daktilo is available for Alpine Edge. It can be installed via apk after enabling the testing repository. apk add daktilo Binary releases See the available binaries for different targets from the releases page. Build from source 1. Clone the repository. git clone https://github.com/orhun/daktilo && cd daktilo/ 2. Build. CARGO_TARGET_DIR=target cargo build --release Binary will be located at target/release/daktilo. Usage daktilo [OPTIONS] Options: -v, --verbose Enables verbose logging [env: VERBOSE=] -p, --preset Sets the name of the sound preset to use [env: PRESET=] -l, --list Lists the available presets -c, --config Sets the configuration file [env: DAKTILO_CONFIG=] -i, --init Writes the default configuration file -h, --help Print help -V, --version Print version Configuration daktilo can be configured with a configuration file using the TOML format. The path of the configuration file can be specified via --config argument or DAKTILO_CONFIG environment variable. It can also be placed in one of the following global locations: * / daktilo.toml * / daktilo/daktilo.toml * / daktilo/config depends on the platform as shown in the following table: Platform Value Example Linux $XDG_CONFIG_HOME or $HOME /home/orhun/.config /.config macOS $HOME/Library/Application /Users/Orhun/Library/Application Support Support Windows {FOLDERID_RoamingAppData} C:\Users\Orhun\AppData\Roaming See daktilo.toml for the default configuration options. You can also create the default configuration file in the current directory with --init flag: daktilo --init Adding custom presets The configuration file consists of an array of sound_preset entries. To define an array in TOML, you can create different sections as follows: [[sound_preset]] name = "custom" key_config = [] [[sound_preset]] name = "another_custom" key_config = [] disabled_keys = [] As shown above, sound_preset consists of 2 entries: * name: The name of the preset. It will be used in conjunction with --preset flag. e.g. --preset custom * key_config: An array of key press/release events for assigning audio files to the specified keys. It can also be used to control the volume etc. * disabled_keys: An array of keys that will not be used for playback. Click for the list of available keys. Alt, AltGr, Backspace, CapsLock, ControlLeft, ControlRight, Delete, DownArrow, End, Escape, F1, F10, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, Home, LeftArrow, MetaLeft, MetaRight, PageDown, PageUp, Return, RightArrow, ShiftLeft, ShiftRight, Space, Tab, UpArrow, PrintScreen, ScrollLock, Pause, NumLock, BackQuote, Num1, Num2, Num3, Num4, Num5, Num6, Num7, Num8, Num9, Num0, Minus, Equal, KeyQ, KeyW, KeyE, KeyR, KeyT, KeyY, KeyU, KeyI, KeyO, KeyP, LeftBracket, RightBracket, KeyA, KeyS, KeyD, KeyF, KeyG, KeyH, KeyJ, KeyK, KeyL, SemiColon, Quote, BackSlash, IntlBackslash, KeyZ, KeyX, KeyC, KeyV, KeyB, KeyN, KeyM, Comma, Dot, Slash, Insert, KpReturn, KpMinus, KpPlus, KpMultiply, KpDivide, Kp0, Kp1, Kp2, Kp3, Kp4, Kp5, Kp6, Kp7, Kp8, Kp9, KpDelete, Function, Unknown As an example, here is how you can configure key_config: key_config = [ { event = "press", keys = "Return", files = [{ path = "ding.mp3", volume = 1.0 }] }, ] * event: "press" or "release" * keys: A regular expression (regex) for matching the keys. * files: An array of files. + path: The absolute path of the file. If the file is embedded in the binary (i.e. if it is inside sounds/ directory) then it is the name of the file without full path. + volume: The volume of the sound. The value 1.0 is the "normal" volume (unfiltered input). Any value other than 1.0 will multiply each sample by this value. If you have defined multiple files for a key event, you can also specify a strategy for how to play them: key_config = [ { event = "press", keys = ".*", files = [{ path = "1.mp3" }, { path = "2.mp3" }], strategy = "random" }, ] Currently supported strategies are: * strategy = "random": pick a random file from the list and play it. * strategy = "sequential": play the files sequentially. Here is how you can combine everything together: [[sound_preset]] # Custom sound preset named "custom" name = "custom" # Key configurations for various events key_config = [ # When a key starting with "Key" is pressed, play 1.mp3, 2.mp3, and 3.mp3 sequentially { event = "press", keys = "Key*", files = [ { path = "1.mp3" }, { path = "2.mp3" }, { path = "3.mp3" }, ], strategy = "sequential" }, # When a key starting with "Key" is released, play 4.mp3 { event = "release", keys = "Key*", files = [ { path = "4.mp3" }, ] }, # When a key starting with "Num" is pressed, play num.mp3 at a very high volume (10.0) { event = "press", keys = "Num*", files = [ { path = "num.mp3", volume = 10.0 }, ] }, # When any key is pressed, play a random sound from cat.mp3, dog.mp3, or bird.mp3 { event = "press", keys = ".*", files = [ { path = "cat.mp3" }, { path = "dog.mp3" }, { path = "bird.mp3" }, ], strategy = "random" }, ] # Disabled keys that won't trigger any sound events disabled_keys = ["CapsLock", "NumLock"] Similar Projects * bucklespring: Nostalgia bucklespring keyboard sound * selectric-mode: Make your Emacs sound like a proper typewriter Acknowledgements Huge thanks to H. Arda Guler for giving me the idea for this project, sharing the inspiration behind it and implementing the first iteration in Python. Kudos! Donations Support me on GitHub Sponsors Support me on Patreon Support me on Patreon If you find daktilo and/or other projects on my GitHub useful, consider supporting me on GitHub Sponsors or becoming a patron! Contributing See our Contribution Guide and please follow the Code of Conduct in all your interactions with the project. Also, see how you can add new presets here. License License: MIT License: Apache 2.0 Licensed under either of Apache License Version 2.0 or The MIT License at your option. no( o _ o no) - respect crables! Copyright Copyright (c) 2023, Orhun Parmaksiz About Turn your keyboard into a typewriter! daktilo.cli.rs/ Topics rust keyboard sound typewriter hacktoberfest typewriter-mode typewriter-effects typewriter-effect daktilo typewriter-animation typewriter-sounds Resources Readme License Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT Code of conduct Code of conduct Security policy Security policy Activity Stars 336 stars Watchers 3 watching Forks 8 forks Report repository Releases 2 v0.1.0 Latest Oct 2, 2023 + 1 release Sponsor this project * * patreon patreon.com/orhunp * https://www.buymeacoffee.com/orhun Learn more about GitHub Sponsors Contributors 6 * @orhun * @dependabot[bot] * @arda-guler * @simos * @madhur * @mergify[bot] Languages * Rust 100.0% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time.