{"id":21556831,"url":"https://github.com/pinam45/consolecontrol","last_synced_at":"2026-04-17T06:33:53.380Z","repository":{"id":67979973,"uuid":"89503883","full_name":"pinam45/ConsoleControl","owner":"pinam45","description":"A library to control your console (Windows/UNIX)","archived":false,"fork":false,"pushed_at":"2018-10-11T15:30:30.000Z","size":117,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-03T00:16:56.109Z","etag":null,"topics":["c","console","console-library","library","unix","windows"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pinam45.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":"2017-04-26T16:34:51.000Z","updated_at":"2019-04-10T23:53:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"3ccd2a7c-f45f-4c25-b6af-9acbb26f7ad0","html_url":"https://github.com/pinam45/ConsoleControl","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/pinam45/ConsoleControl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinam45%2FConsoleControl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinam45%2FConsoleControl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinam45%2FConsoleControl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinam45%2FConsoleControl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pinam45","download_url":"https://codeload.github.com/pinam45/ConsoleControl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinam45%2FConsoleControl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31918650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"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":["c","console","console-library","library","unix","windows"],"created_at":"2024-11-24T08:10:02.798Z","updated_at":"2026-04-17T06:33:53.363Z","avatar_url":"https://github.com/pinam45.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ConsoleControl\n\n[![Build Status](https://travis-ci.org/pinam45/ConsoleControl.svg?branch=master)](https://travis-ci.org/pinam45/ConsoleControl)\n![platform](https://img.shields.io/badge/platform-UNIX%20%7C%20Windows-lightgrey.svg)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://opensource.org/licenses/MIT)\n\nConsoleControl is a C, easy to use, library to control your console.\n\nThis library, without any dependencies, supply useful functions to quickly made user interfaces and simple shapes drawings providing basic features (moving the cursor, colors...), function to print shapes (line, rectangle, circle...) and UI elements (menu, messages...).\n\nFor a complete library to make complex console UI using terminfo/termcap go check [ncurses](http://invisible-island.net/ncurses/ncurses.html).\n\n## Features\n\n### Basic features\n\n- move the cursor / set the position\n- set the cursor visibility\n- save / restore cursor position\n- enable / disable inputs display\n- set background / foreground color\n- get console width / height\n- position check functions\n- clean the screen / the complete console\n- non-blocking *getchar*\n- inputs API\n\t- recognize special keys\n\t- check if an input is waiting\n\t- get input (key + **char**)\n\nThe library recognize the following keys:\nHome, End, Page up, Page down, Up arrow, Down arrow, Left arrow, Right arrow, Backspace, Tab, Enter / Carriage return, Escape, Space / Space bar, Insert, Delete, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12\n\nWhen a key is recognized, it is given with the associated **char**, if the key is not recognized, only the **char** is given (same behavior as *getchar*)\n\n### Shapes\n\nThe library provide function to draw:\n- lines (simple char or pattern string)\n- rectangles\n- full rectangles\n- circles\n\nThe lines and rectangles have special functions to print tables using\n- ``-`` for horizontal lines\n- ``|`` for vertical lines\n- ``+`` for intersections\n\n### UI elements\n\nEach element is available in a *table* style and with colors:\n- Multiple choices menu\n\t- With title\n\t- Allow to choose an option from a string array\n\t- Default choice\n\t- Configurable behavior on *escape* key input\n- Options menu\n\t- With title\n\t- Allow to set values of different options\n\t\t- Multiple choices options\n\t\t- Integer options (within a min and a max value)\n\t\t- Character options (within a min and a max value)\n\t- Default values\n\t- Configurable exit / validate text\n\t- Store if *escape* key was used to exit (can be used to save only on user validation)\n- Messages\n\t- With or without title\n\t- Display a message (multiple lines support)\n\t- 3 possible choices for the user to choose between can be set\n\t\t- left\n\t\t- middle\n\t\t- right\n\t- Configurable behavior on *escape* key input\n\t\t- No effect\n\t\t- Exit without choosing\n\n### Examples\n\nExamples for basic and UI features are provided with the library, to build them see the **build** section.\n\n## Dependencies\n\nNo dependencies, the library only uses:\n- The standard library\n\t- stdio.h\n\t- stdlib.h\n\t- stdbool.h\n\t- string.h\n- On UNIX based systems: the system interface from [The Single UNIX Specification](http://www.unix.org/what_is_unix/single_unix_specification.html)\n\t- unistd.h\n\t- termios.h\n\t- fcntl.h\n\t- sys/ioctl.h\n- On Windows systems: the windows API\n\t- windows.h\n\n## Build\n\nTo build the lib you need a c11 compliant compiler.\n\nA *CMakeLists.txt* is available, see [Running CMake](https://cmake.org/runningcmake/) for more information.\n\nIf you use **GCC** you can also use the *Makefile*:\n\nTo build the lib:\n\n    $ make lib\n\nTo build the lib and the examples:\n\n    $ make all\n\nor just:\n\n    $ make\n\n## Copyright\n\nThis work is under the MIT License\n\n[Read the license file](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinam45%2Fconsolecontrol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinam45%2Fconsolecontrol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinam45%2Fconsolecontrol/lists"}