Coder Social home page Coder Social logo

johannesmp / console-input Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matthewcech/console-input

0.0 2.0 0.0 2.46 MB

Allows for cross-platform reading of keypresses with a simple header file.

License: Other

Batchfile 4.60% Shell 1.13% Lua 32.45% C 53.01% C++ 8.81%

console-input's Introduction

Console-Input

Allows for cross-platform reading of keypresses with a simple header file. Contains a very small test application to print out the key code of a given key and the character for it. Nothing has to be built - the file you are looking for is console-input.h in the Source folder!

What to use

  • There is a single file, console-input.h, that can be found in the source folder. All you need to do is include this in a project!

Building the example

  • Build on *nix with Build.sh or by running Build/premake5 gmake
  • Build Test on windows for VS2015 using Build.bat or by running Build/premake5 vs2015
  • If you think all of that is a bit much, you can just use the command line g++ main.cpp -o example.

Usage

  • Just copy console-input.h into your project directory, and include it with #include "console-input.h"
  • Check if a key was hit with KeyHit(), Get the key in question with GetChar()
  • Works in C and C++

console-input's People

Contributors

johannesmp avatar matthewcech avatar

Watchers

 avatar  avatar

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.