I realise I might be asking quite a lot here but I have no idea what I need to do in order to get this to work correctly.

I have the following.
Just press the "a" key on your keyboard to see what it does.

Now, I want the to only be able to run once a specific sequence on keys have been pressed beforehand [the konami code].

Does anyone know how I'd be able to integrate the code I have with
http://namuol.github.io/cheet.js/ or a similar keylogging script?

I have very little knowledge with scripting this seems completely incomprehendable to me. It's possible but I don't know how to go about doing it.

try this: http://jsfiddle.net/eT2a4/

I made this so that if you writte "img" it will do your thing.

You can change that for the string you want, or you can even make a switch and have multiple key words.

So based on your description, you want to integrate this cheet.js into your code? You have to download the files and integrate the scripts by placing these into the <head> section of your page...of course referencing the correct path in your folder structure. Then follow the documentation provided on that site.

<script src="/bower_components/cheet.js/cheet.js" ></script>
<script src="/components/namuol-cheet.js/cheet.js" ></script>

Thanks for the replies..

At the time of writing the question I was quite tired but after revisiting the task today, I've mangaed to get it to work as I wanted it to.

It was simply creating a new funciton and then calling it

like so,

    cheet('↑ ↑ ↓ ↓ ← → ← → b a', function () {
    function Appear()
$(function () {
    var images = [
    var index = 0;
    $(document).on('keypress', function (event) {
        var c = String.fromCharCode(event.charCode);
        if(c === 'a') {
            var image = images[index];
            var newindex = Math.floor((Math.random()*15)+1);
            newindex = Math.floor((Math.random()*15)+1);
            index = newindex;
            $('<img style="position: fixed; bottom: 0; right: -400" src="' + image + '"/>').appendTo(document.body).animate({right: '200%'}, 3500, function() {