HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
susam
uncap
C2015–2025
susam / uncap

uncap

Map Caps Lock to Escape or any key to any key

14Distinct people
33Mentions
2Explicit recommenders
1.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Map Caps Lock to Escape or any key to any key

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

For windows i recommend uncap https://github.com/susam/uncap

spapas82 used a recommendation phrase. 2 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 12:01:57 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year33 dated mentions

Observed mentions: 2015-09-13 11:44:26 UTC to 2025-04-24 11:51:14 UTC.

024682015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20152016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 6 mentions; 1 submissions, 5 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 8 mentions; 1 submissions, 7 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 5 mentions; 4 submissions, 1 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 6 mentions; 4 submissions, 2 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC211
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC202
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC615
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC110
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC817
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC541
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC642
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101

What Hacker News says

8 sources
strncpy() does not guarantee that the copied string would be terminated with a null byte ('\0'). For a call that looks like strncpy(dst, src, n), if there is no null byte in the first n bytes of src, the string copied to dst would also not contain a null byte. Here is an example code to demonstrate the problem: #include <stdio.h> #include <string.h> int main() { char a[] = "01234567"; strncpy(a, "foobar", 4); printf("%.8s\n", a); return 0; } Here is the output: $ cc -std=c89 -Wall -Wextra -pedantic foo.c && ./a.out foob4567 A C89-conforming alternative I use is a macro like this that guarantees '\0'-termination as the first thing: #define strcp(a, b, c) (a[0] = '\0', strncat(a, b, c - 1)) An example from my code: https://github.com/susam/uncap/blob/master/uncap.c#L78-L87 Here is how to use it:
Read the rest
#include <stdio.h> #include <string.h> #define strcp(a, b, c) (a[0] = '\0', strncat(a, b, c - 1)) int main() { char a[] = "01234567"; strcp(a, "foobar", 4); printf("%.8s\n", a); return 0; } Here is the output: $ cc -std=c89 -Wall -Wextra -pedantic foo.c && ./a.out foo
In Banned C standard library functions in Git source code
EdSchouten·Jul 20, 2019Recommendation phrase
Easter egg in the source code: https://github.com/susam/uncap/blob/78f52d7b2e03fc51885c8072... Output: ............................................................... ............................................................... .................. @@@@@@@ ......... @@@@@@@ .................. ............... @@@@ @@@@ ... @@@@ @@@@ ............... ............. @@@ @@@ @@@ @@@ ............. ............ @@@ @ @@@ ............ ............ @@@ Cutie Pai, @@@ ............ ............ @@@ @@@ ............ ............. @@@ I love you! @@@ ............. ............... @@@@ @@@@ ............... .................. @@@@ -- Susam @@@@ .................. ...................
Read the rest
.. @@@@ @@@@ ..................... ........................ @@@@ @@@@ ........................ ........................... @@@ @@@ ........................... .............................. @ .............................. ............................................................... ...............................................................
In Uncap - Map Caps Lock to Escape on Windows, Linux, and macOS
Me too. When I get a new system, the first thing I do is map CapsLock to Escape. On Windows, I use the Uncap [ https://github.com/susam/uncap ] tool because it does not require install or restart. The tool has good documentation to map CapsLock to Escape for Linux and MacOS too. On the flip side, I struggle to use Vim when I need to do so someone else's computer. :-D
In Handy Keymaps in Vim
> (only nit -- after a day or three heavy use it sometimes takes me a while to stop hitting capslock for escape on my regular keyboard when I'm home) Why don't you rebind your Caps Lock to Esc? For Windows there's uncap <https://github.com/susam/uncap>; on Linux you can find it in your KDE/Gnome settings or look at the uncap Github page for other methods. Or if you do use the Caps Lock key frequently, what for?
In iPad Pro as Development Machine

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.