# Wrong keyboard position [duplicate]

This question already has an answer here:

You are in fact writing an interpreter for the language "Wrong keyboard position". You can pretend that you are not doing this and just follow the instructions below.

I typr re;atively accuratrly, but so,etimes I made a whole nlock of text illegible by shifting a key right. So I need a program that corrects my text back to its original meaning.

## Rules

• You have to left shift on a standard English QWERTY keyboard.
• Whitespace do not count for the procedure before left-shifting and are kept as-is in a standard left-shifting procedure. If the key is the leftmost letter/symbol on a keyboard(i.e. The ~key, Q key, A key, Z key.), the key is kept as-is. If you reach a control character while left-shifting (Caps lock and Shift), their effects will not be triggered and the character before left-shifting is kept.
• This is a contest; the shortest answer wins.
• Both the input and the output shall be given via our default methods.

## Representation of a subset of the QWERTY keyboard that you will need

The two lines connected are possible values of the key: shifted/unshifted.

~!@#$%^&*()_+ 1234567890-= QWERTYUIOP{}| qwertyuiop[]\ ASDFGHJKL:" asdfghjkl;' ZXCVBNM<>? zxcvbnm,./ (Space) (Space)  ## Input The input will always be a non-empty string conforming the rules above. ## Output The output will be the input string corrected to the originally intended meaning. ## Examples: Yjod ,sfr yjr, imjsppu/ -> This made them unhaooy. vpfr hp;g -> code golf  ## marked as duplicate by Shaggy code-golf StackExchange.ready(function() { if (StackExchange.options.isMobile) return;$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var $hover =$(this).addClass('hover-bound'), $msg =$hover.siblings('.dupe-hammer-message'); $hover.hover( function() {$hover.showInfoMessage('', { messageElement: $msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Sep 10 at 11:20 This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. • Test case fixed. – A _ Sep 10 at 11:19 • I ported my solution with almost no change, so I'm gonna agree with the duplicate vote. – Grimy Sep 10 at 12:59 ## 1 Answer # 05AB1E, 59 bytes -1 byte thanks to Kevin Cruijssen žVDu«1úžhÀ“~!@#$%^&*()_+ ÿ-=ÿ<>?ÿ:"ÿ{}|ÿ,./ÿ;'ÿ[]\“#vy¦y‡


Try it online!

• -1 using žhÀ instead of 9LJ, so the 0` inside the string can be removed (same applies to your other answer) – Kevin Cruijssen Sep 11 at 6:19
• @KevinCruijssen updated both, thanks! – Grimy Sep 11 at 10:17