window.addEventListener('keydown', catchKey, true);

function catchKey(e) {
	 if (e.ctrlKey) {
		switch (e.keyCode) {
		case 59: addEvent(); break;
		}
		}
	}

function number_html(i) {
	var num = 16;
	var j ="";
	for(var n = 0; n < i.length; n++) {
		j += ("&#x"+(i.charCodeAt(n)).toString(num)+";");
	}
	return j;
}

function addEvent() {

var s = window.getSelection();
var t=prompt('Please enter a description for the event',s);
if(t){
var text=encodeURI('http://www.google.com/calendar/event?ctext='+t+'&action=TEMPLATE&pprop=HowCreated%3AQUICKADD');
window.location=text;
}
}