Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [keyboard]

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

20
votes
6answers
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 ...
21
votes
14answers
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 ...
20
votes
15answers
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 ...
10
votes
3answers
318 views

Convert text to key presses

I am a robot. I bought this keyboard because of its easy rectangular layout: ...
184
votes
56answers
15k 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 ...
20
votes
15answers
3k views

The Keyboard Shift Cipher

Given the following input: An integer n where n > 0. A string s where ...
30
votes
3answers
457 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 ...
25
votes
32answers
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 ...
8
votes
7answers
611 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,...
23
votes
22answers
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: ...
25
votes
20answers
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 ...
6
votes
0answers
180 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 ...
13
votes
8answers
814 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 ...
3
votes
2answers
173 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, ...
21
votes
16answers
3k 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 ...
107
votes
32answers
14k 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) ...
14
votes
6answers
443 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 ...
15
votes
19answers
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 choice from ...
26
votes
6answers
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' ...
21
votes
2answers
747 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 ...
8
votes
18answers
744 views

Draw an ASCII art phone keypad

Draw the following in the fewest bytes possible: ...
30
votes
16answers
7k 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 ...
4
votes
1answer
202 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. ...
39
votes
21answers
3k views

Which Row is the Key On?

Given any of the following characters (or a newline): `1234567890-=~!@#$%^&*()_+qwertyuiop[]\QWERTYUIOP{}|asdfghjkl;'ASDFGHJKL:"zxcvbnm,./ZXCVBNM<>? ...
19
votes
10answers
5k 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 ...
1
vote
5answers
115 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 ...
12
votes
5answers
477 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 ...
37
votes
33answers
4k 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 ...
21
votes
2answers
786 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, ...
17
votes
5answers
881 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. ...
1
vote
0answers
62 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)...
13
votes
3answers
702 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 ...
13
votes
4answers
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 ...
17
votes
6answers
406 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 ...
13
votes
4answers
898 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 ...
10
votes
9answers
4k 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 ...
5
votes
1answer
564 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. ...
8
votes
2answers
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, ...
27
votes
6answers
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-...
24
votes
19answers
13k 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 ...
13
votes
9answers
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 ...
45
votes
1answer
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 ...
7
votes
4answers
1k views

DVORAK Keyboard layout

Here's an interesting challenge... I want you to golf code than 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 ...