0
\$\begingroup\$

The world has been invaded by aliens. They are everywhere killing people and taking over the world. You are hiding with your friend.

They have one weakness - the high pitched sounds.

You can't go yell at them, because you'd get caught before, so you remember the state had a conveniently made machine that emits a high pitched sound all over the earth, which will get rid of the aliens. The only problem is the aliens are guarding the place where the machine is and you can't possibly go there.

As your friend is an hacker, they created a program that activates the machine if you type the string KILL ALIENS NOW!. While they were about to type it, an alien discovered and caught 'em, throwing the querty keyboard on the floor. The keyboard is as show in the picture.

enter image description here

Somehow it still works!...well, kinda...when you type a character, the character on its right also types. So if you type 5, it will type 56. The keyboard arrows work normally and all the keys in the numpad and meta keys (print screen, etc) also work well and do nothing else.

The delete and backspace keys don't work.

Typing shift left arrow for example, will delete a character of code and replace it with a z.

Typing j does not type k, for example (this behaviour is the same for the other borbidden keys).

If you type right shift you will click in the up arrow too, for example.

The letters k, i, l, a and n don't work (how convenient, huh). You decide to program the KILL ALIENS NOW! output, but if you do it in a lot of bytes the aliens will discover that someone is trying to break into the machine.

How will you type the string with that stupid keyboard?

Summary of the rules

Make a program with any programming language you wish without the letters k, i, l, a and n, but if you type a character, it will type the one on the right too, that outputs the string KILL ALIENS NOW! with the least size of bytes possible for it to not appear in the alien's database as the current top action.

\$\endgroup\$

closed as unclear what you're asking by FryAmTheEggman, Wheat Wizard, caird coinheringaahing, Jo King, trichoplax Oct 21 at 6:58

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    \$\begingroup\$ What happens if you type a key at the edge of the keyboard? Also, what are the effects of meta-characters like "Delete". Ex, if I want a \ in my program, it would have to be followed by a Delete key. Does that delete key get echoed as an unprintable character? Does it delete the \ I just typed? Does it do nothing? \$\endgroup\$ – pppery Oct 20 at 16:19
  • 2
    \$\begingroup\$ The Backspace key is followed by Print Screen, which won't affect our code. So we can always just backspace the extra character. To type the forbidden characters, we type the key to the left, use Left Arrow (the subsequent Down Arrow won't do anything), Backspace, Right Arrow (types a 0), Backspace. Is there a better way to do this? \$\endgroup\$ – HiddenBabel Oct 20 at 17:12
  • 1
    \$\begingroup\$ Also, is the score the number of bytes or the number of keypresses? \$\endgroup\$ – pppery Oct 20 at 17:31
  • 6
    \$\begingroup\$ How do you type programs containing unprintable characters? \$\endgroup\$ – pppery Oct 20 at 17:40
  • 1
    \$\begingroup\$ Why is shift treated like it is being pressed second? Shouldn't shift g for example be treated as shift z and g h, resulting in ZGH? \$\endgroup\$ – Jo King Oct 21 at 0:42
1
\$\begingroup\$

Befunge-98 (PyFunge), 92 bytes

1290/zx:"())_QWCV*(P[CVNM	QRTUI*(RTRT	QAS:"cv'
1290/zx#$J:"12-=!@!@j!@780-m,45hjvbvbvbvbvb<>

19/ (the Shiftkey that results from this can be ignored since shift by itself does nothing) zRight ShiftDown Arrow (to deselect anything that may have been selected by Shift and its implicit Up Arrow);90qc8pcnTabru8rrTaba;(release Shift)c'19/zRight ShiftDown Arrow3j(k is a forbidden character so is not generated);(release Shift)1-Right ShiftDown Arrow11(release Shift)jRight ShiftDown Arrow1(release Shift)70m4hvvvvvRight ShiftDown Arrow,

Note the literal tab characters on the first line.

Try it online!

\$\endgroup\$
2
\$\begingroup\$

Brainfuck, 538 221 byte

++++++++++[z>?+++++++>?++++++++++>?+++>?+<z<z<z<z-]\>?+++++./-=-=./+++././<z++++++++++++++++++++++++++++++++./>?-=-=-=-=-=-=-=-=-=-=-=./+++++++++++./-=-=-=./-=-=-=-=./+++++++++./+++++./<z./>?-=-=-=-=-=./+./++++++++./<z+./

Try it online!

I hope it is correct...

\$\endgroup\$
  • \$\begingroup\$ @wizzwizz4 when i understand it right i only need the z character when i delete another and in this code i dind't delet any character but it can be that i made a mistake... \$\endgroup\$ – Delta Oct 20 at 19:41
  • 1
    \$\begingroup\$ Oh, wait; right-shift exists. My bad! \$\endgroup\$ – wizzwizz4 Oct 20 at 19:42
  • 1
    \$\begingroup\$ After each period (.) there should be a / no? \$\endgroup\$ – Duarte Arribas Oct 20 at 19:45
  • 1
    \$\begingroup\$ sry my bad forget them :D \$\endgroup\$ – Delta Oct 20 at 19:48
  • \$\begingroup\$ @DuarteArribas should be better now \$\endgroup\$ – Delta Oct 20 at 19:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.