Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [keyboard]

For challenges involving a keyboard or keyboard layouts, such as QWERTY and AZERTY.

Filter by
Sorted by
Tagged with
27 votes
10 answers
5k views

Distances between keys on a QWERTY keyboard

Inspired by this video by Matt Parker The distances between the letter keys of a QWERTY keyboard are somewhat standardised. The keys are square and both the horizontal and vertical spacing are 19.05mm ...
user avatar
  • 18.7k
20 votes
5 answers
2k views

KEYBOARD FOR MONKE!

Flavortext So...this is awkward. It seems I accidentally turned into a monkey last night after eating one too many banana sundaes. This has made many things inconvenient, especially typing. You see, ...
user avatar
  • 9,266
19 votes
4 answers
2k views

Simulate my keyboard wave light!

(The word frame in the following text does not mean an actual frame, it is used as a placeholder for an undefined time unit) The task Imagine you have a keyboard layout with only letters like so: <...
user avatar
  • 3,890
28 votes
17 answers
3k views

Toggle Shift Key

Objective Given an ASCII character, toggle its "shift-ness" on the standard US keyboard (ANSI-INCITS 154-1988 (R1999)), then output it. Mapping ...
user avatar
  • 4,163
13 votes
5 answers
602 views

Typing, but to the left [closed]

Background You've been given a task to take notes for a meeting. You start typing on your Google Doc, but you don't have enough time during the meeting to look at your keyboard while you type. ...
user avatar
  • 2,464
15 votes
4 answers
579 views

Convert between Korean two-set keyboard and qwerty keyboard

Introduction It is somewhat like DVORAK Keyboard layout , but MUCH harder. Let's talk about the Korean keyboard first. As you can see in Wikipedia, there is a Kor/Eng key to change between Korean and ...
user avatar
  • 969
25 votes
7 answers
2k views

Walk Across a Keyboard

Given a word (or any sequence of letters) as input, you must interpolate between each letter such that each adjacent pair of letters in the result is also adjacent on a QWERTY keyboard, as if you ...
user avatar
  • 589
22 votes
14 answers
1k views

What numbers are these?

While I was writing numbers I noticed after a while that my keyboard had the Shift key pressed and blocked and all I wrote was $%&-like characters. And even ...
user avatar
  • 12.6k
21 votes
15 answers
5k views

One line Keyboard

The Challenge The goal of this challenge is to determine whether a given String can be typed using only one line of a standard UK QWERTY keyboard. This is ...
user avatar
  • 1,007
10 votes
3 answers
585 views

Convert text to key presses

I am a robot. I bought this keyboard because of its easy rectangular layout: ...
user avatar
  • 12k
218 votes
62 answers
18k views

No A, just CAPS LOCK

What happens when the CapsLock key on your keyboard doesn't have a notch in it? "This hPPENS." The goal of this program is to consistently emulate keyboard misses where each A press is replaced with ...
user avatar
  • 1,731
21 votes
15 answers
4k views

The Keyboard Shift Cipher

Given the following input: An integer n where n > 0. A string s where ...
user avatar
31 votes
3 answers
1k views

The Drunken Typist

Background A typist comes home wfter some riugh drinkinh and realizes thag an importsnt letter still needs to be wtitten. To make sure he vets the text correct, he writes the text character bh ...
user avatar
24 votes
32 answers
5k views

Circular Keyboard Spiral

This is a QWERTY keyboard. Q W E R T Y U I O P A S D F G H J K L Z X C V B N M We can "spiral out" on this keyboard, starting from G. The spiral will start at ...
user avatar
14 votes
10 answers
912 views

Find the average of a word

Inspired by this chat message Your task will be to take a word and find the average position of its letters on the keyboard as a letter. Keyboard Layout Since layouts vary from keyboard to keyboard,...
user avatar
  • 85k
26 votes
24 answers
2k views

Is it an Ordered Word?

(inspired by this post over on Puzzling. CAUTION: SPOILERS FOR THAT PUZZLE ARE BELOW.) The standard telephone keypad correlates letters to numbers as follows: ...
user avatar
  • 42.8k
24 votes
21 answers
4k views

How many times should I press this?

We are all used to the old-school telephone keypad, right? For reference, here is what it looks like: Given a String consisting only of lowercase ASCII letters and single spaces, your task is to ...
user avatar
  • 41.4k
6 votes
0 answers
240 views

Keyboard vs Code-Golf? [closed]

If you've come here, you probably know what code-golf is, and that's what I'm going to assume. Story (I guess) Keyboards are input devices we use all the time. They existed before mice and touch ...
user avatar
  • 171
14 votes
9 answers
2k views

Keyboard layouts challenge

The keyboard layout people commonly use is the QWERTY layout as shown below. But there are also other keyboard layouts: DVORAK COLEMAK WORKMAN Your task Your code will take two inputs: the name ...
user avatar
3 votes
2 answers
314 views

Keyboard Encryption [duplicate]

Challenge Given a string with any characters a-z or A-Z, return an 'encrypted' string, where all characters are replaced by the character next to it (assuming a QWERTY keyboard). Case (uppercase, ...
user avatar
21 votes
16 answers
4k views

Fix my Fat Fingers

Code Golf Challenge I have an isdue, my fingrrs are fat and I freqintly jave an isdue of ty[ing one keystrpke to the right on my kryboard. I'm afraid the isdue is getyng worse anf worsr as time goes ...
user avatar
112 votes
32 answers
18k views

Blink the CAPS LOCK

Most computer keyboards feature a small integrated LED light, indicating the current input mode, as controlled with the CAPS LOCK button. Your task is to blink it: Turn it on; Wait for 0.5 (+/-0.1) ...
user avatar
  • 8,386
16 votes
6 answers
980 views

KeyPad Code to Text!

Given a String and an Array as input, your task is to output the text the input String will print when typed on a typical Mobile Keypad. In a Mobile Keypad, a letter is typed by pressing a button n ...
user avatar
  • 4,890
17 votes
22 answers
2k views

Shortest Konami Code

The Problem You must write a program that, when the Konami Code is typed in during runtime, prints the string "+30 lives" and sounds a noise of your ...
user avatar
  • 3,532
25 votes
6 answers
1k views

Efficient Typing on a Game Boy

Many old Game Boy games often required string input from the user. However, there was no keyboard. This was handled by presenting the user with a "keyboard screen" like so: The 'character pointer' ...
user avatar
  • 13.9k
22 votes
1 answer
1k views

Virtual Keyboard Text Input

On modern game consoles and other devices without traditional keyboards, trying to input text is a nightmare. Having to type with a few buttons and a joystick on a virtual keyboard is annoying, and I ...
user avatar
9 votes
18 answers
1k views

Draw an ASCII art phone keypad

Draw the following in the fewest bytes possible: ...
user avatar
  • 4,507
32 votes
19 answers
10k views

Longest word using a single row of the qwerty keyboard

The three rows of the qwerty keyboard are qwertyuiop, asdfghjkl and zxcvbnm. Your task is to ...
user avatar
4 votes
1 answer
247 views

A loose spellchecker

John Doe used to be one of the fastest QWERTY keyboard typists in the world, but a recent head injury caused by a stampeding herd of downgoats has critically hampered his ability to type accurately. ...
user avatar
39 votes
21 answers
3k views

Which Row is the Key On?

Given any of the following characters (or a newline): `1234567890-=~!@#$%^&*()_+qwertyuiop[]\QWERTYUIOP{}|asdfghjkl;'ASDFGHJKL:"zxcvbnm,./ZXCVBNM<>? ...
user avatar
  • 28.4k
20 votes
10 answers
8k views

Print the QWERTY keyboard using keys that are as close together as possible

Normally, challenges are scored in bytes, or sometimes Levenshtein distance, but for this one we're using keyboard distance -- the number of keys between the keys used to type the program (use the ...
user avatar
  • 6,536
1 vote
5 answers
128 views

Parrot User’s Delay [duplicate]

A simple code golf challenge similar to an already existing, but more complex one: Wait for user to press enter. Wait for user to press enter again. Print the elapsed time between the 1. and 2. Wait ...
user avatar
  • 27.1k
12 votes
5 answers
591 views

Adjacent Letter Test

One aspect of password strength testing is runs of adjacent letters on the keyboard. In this challenge, a program must be created that returns true if a string ...
user avatar
  • 11.1k
40 votes
40 answers
6k views

Output the qwerty keyboard

Given a character, output (to the screen) the entire qwerty keyboard layout (with spaces and newlines) that follows the character. The examples make it clear. Input 1 ...
user avatar
20 votes
2 answers
839 views

Flaming Doorknob Keyboards!

Well, turns out Doorknob's username on GitHub, Reddit, and other sites is KeyboardFire. That gives me an idea... The task You work at KeyboardFire Inc., a company that makes special keyboards. And, ...
user avatar
17 votes
5 answers
2k views

Cell Phone Keyboard Typing

Cell Phone Keyboard Typing This question was asked a while back, but was closed due to poor specs. So, I'm redoing it, with better specs. This question is related, but goes in the opposite direction. ...
user avatar
1 vote
0 answers
102 views

QWERTY keyboard string length [duplicate]

QWERTY keyboard distance (QKD) is, in short, the distance between two letters/numbers/punctuation keys on a standard QWERTY keyboard (if you don't have one around, you can check this Wikipedia picture)...
user avatar
14 votes
3 answers
791 views

Check all the keys of a keyboard

Write the shortest program that waits for every key of a Standard 101 key US Keyboard* to be pressed and then exits writing OK! Every time a key is pressed the program displays on a new line the ...
user avatar
13 votes
4 answers
1k views

The very weird word counter

INPUT: Any string consisting exclusively of lowercase letters via function argument, command line argument, STDIN, or similar. OUTPUT: Print or return a number that will represent the sum of the ...
user avatar
  • 437
23 votes
9 answers
746 views

Given an input, move it along the keyboard by N characters

The Challenge: Given any input that can be typed on a keyboard, move the text along by N chars. Here is the QWERTY keyboard to be used. You can ignore the modifier keys (Shift, Caps, Enter, Delete ...
user avatar
  • 2,869
13 votes
4 answers
963 views

Is the word typeable with keys adjacent to each other?

Before reading this I suggest reading this little puzzle: https://puzzling.stackexchange.com/questions/11408/longest-word-with-adjacent-letters-on-a-keyboard I want you to make a program that takes ...
user avatar
  • 7,940
12 votes
9 answers
7k views

Create a T9 keyboard

This question asks for a T9 dictionary matching functionality which is a very interesting problem. But T9 has another way of typing and that is typing character-by-character. You would NOT need a ...
user avatar
  • 775
5 votes
1 answer
643 views

Make your country proud!

You are from the tiny country of Que-Wopistan. The Que-Wopistonion's are a proud people, and every Que-Wopistonian dreams of making their country proud by representing their country in the Olympics. ...
user avatar
9 votes
2 answers
1k views

Emulate the Professor's typing

Emulate the Professor's typing Background Unfortunately, the Professor is not able to use his keyboard properly: whenever he is meant to use the Shift key, he presses Caps Lock once before typing, and ...
user avatar
  • 1,589
27 votes
6 answers
2k views

Swipe Type Converter

The next revolution in typing on laptops was released on the first of April, 2014 by SwiftKey. However, I want to be the first person to write a swiping nano clone, but, as I can't find a good swipe-...
user avatar
  • 1,339
27 votes
18 answers
17k views

Create a "hacker typer" program that renders its own source code

If you are unfamiliar with hacker typer, see hackertyper.net. In short, it is a program that outputs one chunk of a code base per keystroke for comedic effect. BUT, the hackertyper.net version is far ...
user avatar
  • 519
13 votes
9 answers
1k views

Testing Keyboards

My Problem At my current place of employment, I single-handedly (ok dual-handedly because I'm missing no limbs) maintain approximately 700 laptops. Due to the nature and frequency of their use, I ...
user avatar
45 votes
1 answer
2k views

Minimal keystrokes needed to type a given text

We all know that programmers tend to be lazy. In order to maximize your free time, you decide to write a program that outputs a minimal number of keystrokes for text fed into it. Input: Text that has ...
user avatar
  • 1,939
11 votes
6 answers
2k views

DVORAK Keyboard layout

Here's an interesting challenge... I want you to golf code that when executed will allow your input to be converted to mimic output as though you were typing on a DVORAK keyboard layout. The aim is to ...
user avatar