Giter VIP home page Giter VIP logo

getkey's Introduction

getKey

A tiny C program to receive key presses as keycode and character. It can also convert between keycode and character by providing one of them as argument.

GetKey is perfect for the usage in Windows batch or cmd.

Details

GetKey always gives you the keycode and the character as output:

  • The character is directly written to the standard output stream (with no trailing linebreak added).
  • The keycode is returned as exitcode. You can access it with %errorlevel% in cmd or batch.

You have 3 possible ways to specify which character you want to output:

  • By default getKey waits for a keypress by the user and outputs this character. (no arguments required)
  • If you provide a number as argument, it will get interpreted as ASCII-code and the corresponding character will get printed.
  • If you provide a character as argument this character will be used. For strings the first character is used.

Possible Usages

  • Get the keycodes of a series of keys the user types in.
  • Masked input: recieve the character that was typed, but show a different character like *.
  • Print special characters. For example getKey 219 prints โ–ˆ and getKey 7 plays the bell sound.
  • Convert between character and keycode in order to run algorithms like encryption or hashing on the keycode.
  • Store and process user input as series of keycodes to avoid trouble with special characters.

getkey's People

Contributors

anic17 avatar timlg07 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

anic17

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.