Jump to content

Logitech G15 LCD Keyboard


Headrush69
 Share

8 posts in this topic

Recommended Posts

OMG sweet finally, now OS X can also have fun with my G15.

 

A quick edit, since iTunes didnt look like it was working i found a clock that it can display. (From the entropy site). the onlny thing that needs to be fixed is the font it uses, and its all good.

 

 

Copy paste this in the HTML code, and you have a clock on the G15 :D

 

<html>
<head>
<script type="text/javascript">

window.CoolClock = function(canvasId,displayRadius,skinId,showSecondHand,gmtOffset) {
return this.init(canvasId,displayRadius,skinId,showSecondHand,gmtOffset);
}

CoolClock.findAndCreateClocks = function() {
var canvases = document.getElementsByTagName("canvas");
for (var i=0;i<canvases.length;i++) {
	var fields = canvases[i].className.split(" ")[0].split(":");
	if (fields[0] == "CoolClock") {
		new CoolClock(canvases[i].id,fields[2],fields[1],fields[3]!="noSeconds",fields[4]);
	}
}
}

// borrowed from behaviour.js
// actually doesn't work right unless it's at the end of html document
// hence can't have a body onload
// this is a bug
// maybe have a setTimeout hack??
CoolClock.addLoadEvent = function(func){
var oldonload = window.onload;
if (typeof window.onload != 'function')
	window.onload = func;
else
	window.onload = function() {
		oldonload();
		func();
	}
}

CoolClock.config = {
clockTracker: {},
tickDelay: 1000,
longTickDelay: 15000,
defaultRadius: 85,
renderRadius: 100,
defaultSkin: "swissRail",
skins:	{
	// try making your own...

	swissRail: {
		outerBorder: { lineWidth: 1, radius:95, color: "black", alpha: 1 },
		smallIndicator: { lineWidth: 2, startAt: 89, endAt: 93, color: "black", alpha: 1 },
		largeIndicator: { lineWidth: 4, startAt: 80, endAt: 93, color: "black", alpha: 1 },
		hourHand: { lineWidth: 8, startAt: -15, endAt: 50, color: "black", alpha: 1 },
		minuteHand: { lineWidth: 7, startAt: -15, endAt: 75, color: "black", alpha: 1 },
		secondHand: { lineWidth: 1, startAt: -20, endAt: 85, color: "red", alpha: 1 },
		secondDecoration: { lineWidth: 1, startAt: 70, radius: 4, fillColor: "red", color: "red", alpha: 1 }
	},
	chunkySwiss: {
		outerBorder: { lineWidth: 4, radius:97, color: "black", alpha: 1 },
		smallIndicator: { lineWidth: 4, startAt: 89, endAt: 93, color: "black", alpha: 1 },
		largeIndicator: { lineWidth: 8, startAt: 80, endAt: 93, color: "black", alpha: 1 },
		hourHand: { lineWidth: 12, startAt: -15, endAt: 60, color: "black", alpha: 1 },
		minuteHand: { lineWidth: 10, startAt: -15, endAt: 85, color: "black", alpha: 1 },
		secondHand: { lineWidth: 4, startAt: -20, endAt: 85, color: "red", alpha: 1 },
		secondDecoration: { lineWidth: 2, startAt: 70, radius: 8, fillColor: "red", color: "red", alpha: 1 }
	},
	fancy: {
		outerBorder: { lineWidth: 5, radius:95, color: "green", alpha: 0.7 },
		smallIndicator: { lineWidth: 1, startAt: 80, endAt: 93, color: "black", alpha: 0.4 },
		largeIndicator: { lineWidth: 1, startAt: 30, endAt: 93, color: "black", alpha: 0.5 },
		hourHand: { lineWidth: 8, startAt: -15, endAt: 50, color: "blue", alpha: 0.7 },
		minuteHand: { lineWidth: 7, startAt: -15, endAt: 92, color: "red", alpha: 0.7 },
		secondHand: { lineWidth: 10, startAt: 80, endAt: 85, color: "blue", alpha: 0.3 },
		secondDecoration: { lineWidth: 1, startAt: 30, radius: 50, fillColor: "blue", color: "red", alpha: 0.15 }
	},
	machine: {
		outerBorder: { lineWidth: 60, radius:55, color: "#dd6655", alpha: 1 },
		smallIndicator: { lineWidth: 4, startAt: 80, endAt: 95, color: "white", alpha: 1 },
		largeIndicator: { lineWidth: 14, startAt: 77, endAt: 92, color: "#dd6655", alpha: 1 },
		hourHand: { lineWidth: 18, startAt: -15, endAt: 40, color: "white", alpha: 1 },
		minuteHand: { lineWidth: 14, startAt: 24, endAt: 100, color: "#771100", alpha: 0.5 },
		secondHand: { lineWidth: 3, startAt: 22, endAt: 83, color: "green", alpha: 0 },
		secondDecoration: { lineWidth: 1, startAt: 52, radius: 26, fillColor: "#ffcccc", color: "red", alpha: 0.5 }
	},

	// these three created by bonstio from http://bonstio.net
	classic/*was gIG*/: {
		outerBorder: { lineWidth: 185, radius:1, color: "#E5ECF9", alpha: 1 },
		smallIndicator: { lineWidth: 2, startAt: 89, endAt: 94, color: "#3366CC", alpha: 1 },
		largeIndicator: { lineWidth: 4, startAt: 83, endAt: 94, color: "#3366CC", alpha: 1 },
		hourHand: { lineWidth: 5, startAt: 0, endAt: 60, color: "black", alpha: 1 },
		minuteHand: { lineWidth: 4, startAt: 0, endAt: 80, color: "black", alpha: 1 },
		secondHand: { lineWidth: 1, startAt: -20, endAt: 85, color: "red", alpha: .85 },
		secondDecoration: { lineWidth: 3, startAt: 0, radius: 2, fillColor: "black", color: "black", alpha: 1 }
	},

	modern/*was gIG2*/: {
		outerBorder: { lineWidth: 185, radius:1, color: "#E5ECF9", alpha: 1 },
		smallIndicator: { lineWidth: 5, startAt: 88, endAt: 94, color: "#3366CC", alpha: 1 },
		largeIndicator: { lineWidth: 5, startAt: 88, endAt: 94, color: "#3366CC", alpha: 1 },
		hourHand: { lineWidth: 8, startAt: 0, endAt: 60, color: "black", alpha: 1 },
		minuteHand: { lineWidth: 8, startAt: 0, endAt: 80, color: "black", alpha: 1 },
		secondHand: { lineWidth: 5, startAt: 80, endAt: 85, color: "red", alpha: .85 },
		secondDecoration: { lineWidth: 3, startAt: 0, radius: 4, fillColor: "black", color: "black", alpha: 1 }
	},

	simple/*was gIG3*/: {
		outerBorder: { lineWidth: 185, radius:1, color: "#E5ECF9", alpha: 1 },
		smallIndicator: { lineWidth: 10, startAt: 90, endAt: 94, color: "#3366CC", alpha: 1 },
		largeIndicator: { lineWidth: 10, startAt: 90, endAt: 94, color: "#3366CC", alpha: 1 },
		hourHand: { lineWidth: 8, startAt: 0, endAt: 60, color: "black", alpha: 1 },
		minuteHand: { lineWidth: 8, startAt: 0, endAt: 80, color: "black", alpha: 1 },
		secondHand: { lineWidth: 5, startAt: 80, endAt: 85, color: "red", alpha: .85 },
		secondDecoration: { lineWidth: 3, startAt: 0, radius: 4, fillColor: "black", color: "black", alpha: 1 }
	},
	lcd: {
		outerBorder: { lineWidth: 185, radius:4, color: "black", alpha: 1 },
		smallIndicator: { lineWidth: 10, startAt: 90, endAt: 94, color: "#3366CC", alpha: 1 },
		largeIndicator: { lineWidth: 10, startAt: 75, endAt: 94, color: "black", alpha: 1 },
		hourHand: { lineWidth: 12, startAt: 0, endAt: 60, color: "black", alpha: 1 },
		minuteHand: { lineWidth: 5, startAt: 0, endAt: 75, color: "black", alpha: 1 },
		secondHand: { lineWidth: 3, startAt: 50, endAt: 75, color: "black", alpha: 1 },
		secondDecoration: { lineWidth: 3, startAt: 0, radius: 4, fillColor: "black", color: "black", alpha: 1 }
	}

}
};

CoolClock.prototype = {
init: function(canvasId,displayRadius,skinId,showSecondHand,gmtOffset) {
	this.canvasId = canvasId;
	this.displayRadius = displayRadius || CoolClock.config.defaultRadius;
	this.skinId = skinId || CoolClock.config.defaultSkin;
	this.showSecondHand = typeof showSecondHand == "boolean" ? showSecondHand : true;
	this.tickDelay = CoolClock.config[ this.showSecondHand ? "tickDelay" : "longTickDelay"];

	this.canvas = document.getElementById(canvasId);

	this.canvas.setAttribute("width",this.displayRadius*2);
	this.canvas.setAttribute("height",this.displayRadius*2);

	this.canvas.style.width = this.displayRadius*2 + "px";
	this.canvas.style.height = this.displayRadius*2 + "px";

	this.renderRadius = CoolClock.config.renderRadius; 

	this.scale = this.displayRadius / this.renderRadius;
	this.ctx = this.canvas.getContext("2d");
	this.ctx.scale(this.scale,this.scale);

	this.gmtOffset = gmtOffset != null ? parseFloat(gmtOffset) : gmtOffset;

	CoolClock.config.clockTracker[canvasId] = this;
	this.tick();
	return this;
},

fullCircle: function(skin) {
	this.fullCircleAt(this.renderRadius,this.renderRadius,skin);
},

fullCircleAt: function(x,y,skin) {
	with (this.ctx) {
		save();
		globalAlpha = skin.alpha;
		lineWidth = skin.lineWidth;
		if (document.all)
			// excanvas doesn't scale line width so we will do it here
			lineWidth = lineWidth * this.scale;
		arc(x, y, skin.radius, 0, 2*Math.PI, false);
		if (document.all)
			// excanvas doesn't close the circle so let's color in the gap
			arc(x, y, skin.radius, -0.1, 0.1, false);
		if (skin.fillColor) {
			fillStyle = skin.fillColor
			fill();
		}
		else {
			// XXX why not stroke and fill
			strokeStyle = skin.color;
			stroke();
		}
		restore();
	}
},

radialLineAtAngle: function(angleFraction,skin) {
	with (this.ctx) {
		save();
		translate(this.renderRadius,this.renderRadius);
		rotate(Math.PI * (2 * angleFraction - 0.5));
		globalAlpha = skin.alpha;
		strokeStyle = skin.color;
		lineWidth = skin.lineWidth;
		if (document.all)
			// excanvas doesn't scale line width so we will do it here
			lineWidth = lineWidth * this.scale;
		if (skin.radius) {
			this.fullCircleAt(skin.startAt,0,skin)
		}
		else {
			beginPath();
			moveTo(skin.startAt,0)
			lineTo(skin.endAt,0);
			stroke();
		}
		restore();
	}
},

render: function(hour,min,sec) {
	var skin = CoolClock.config.skins[this.skinId];
	this.ctx.clearRect(0,0,this.renderRadius*2,this.renderRadius*2);

	this.fullCircle(skin.outerBorder);

	for (var i=0;i<60;i++)
		this.radialLineAtAngle(i/60,skin[ i%5 ? "smallIndicator" : "largeIndicator"]);

	this.radialLineAtAngle((hour+min/60)/12,skin.hourHand);
	this.radialLineAtAngle((min+sec/60)/60,skin.minuteHand);
	if (this.showSecondHand) {
		this.radialLineAtAngle(sec/60,skin.secondHand);
		if (!document.all)
			// decoration doesn't render right in IE so lets turn it off
			this.radialLineAtAngle(sec/60,skin.secondDecoration);
	}
},


nextTick: function() {
	setTimeout("CoolClock.config.clockTracker['"+this.canvasId+"'].tick()",this.tickDelay);
},

stillHere: function() {
	return document.getElementById(this.canvasId) != null;
},

refreshDisplay: function() {
			var dayNames= ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];
			var monthNames= ["January","February","March","April","May","June",
							 "July","August","September","October","November","December"];
	var now = new Date();
			var df = document.getElementById("datefield");
	if (this.gmtOffset != null) {
		// use GMT + gmtOffset
		var offsetNow = new Date(now.valueOf() + (this.gmtOffset * 1000 * 60 * 60));
		this.render(offsetNow.getUTCHours(),offsetNow.getUTCMinutes(),offsetNow.getUTCSeconds());
	}
	else {
		// use local time
		this.render(now.getHours(),now.getMinutes(),now.getSeconds());
	}
			df.innerHTML = dayNames[now.getDay()]+"<br>"+
						   monthNames[now.getMonth()]+" "+now.getDate()+", "+(1900+now.getYear())+"<br>"+
						   now.toLocaleTimeString();
	window.application.updateDisplay();

	},

tick: function() {
	if (this.stillHere()) {
		this.refreshDisplay()
		this.nextTick();
	}
}
}

CoolClock.addLoadEvent(CoolClock.findAndCreateClocks);
</script>

<style type="text/css">
body {
	position: absolute;
	margin: 0;
	overflow: hidden;
	width: 160px; height: 43px;
	background-color: white;
}

body.border {
	border: 1px solid black;
	padding: 1px;
	width: 156px; height: 39px;
}


body, td {
color: #000000;
	font-size: 9px;
	font-family: sans;
}
</style>
</head>
<body>

<table border="0" cellpadding="0" width="100%"><tr>
 <td> <canvas id="c44" class="CoolClock:lcd:21"></canvas></td>
 <td id="datefield" align="right"> Today </td>

</tr></table>
</body>

</html>

Link to comment
Share on other sites

I have a G15 for my PC and an Apple Wireless keyboard for my Mac. Why would you want a G15 for your mac? Theres cheaper backlit keyboards available (and probably with a larger win key since thats what is acting as your cloverleaf) . The G15 is aimed at gamers and xfire users; no matter what EA is doing or how much ID Software loves OS X, the Mac just cant cut it when it comes to games. (at least right now) The only way I would ever buy a G15 for my Mac is if I were a hardcore WoW player and needed it for the binds. Even so they probably have those extrakey-usb things so you could use that along side your awesome apple keyboard.

Link to comment
Share on other sites

I have a G15 for my PC and an Apple Wireless keyboard for my Mac. Why would you want a G15 for your mac? Theres cheaper backlit keyboards available (and probably with a larger win key since thats what is acting as your cloverleaf) . The G15 is aimed at gamers and xfire users; no matter what EA is doing or how much ID Software loves OS X, the Mac just cant cut it when it comes to games. (at least right now) The only way I would ever buy a G15 for my Mac is if I were a hardcore WoW player and needed it for the binds. Even so they probably have those extrakey-usb things so you could use that along side your awesome apple keyboard.

Why:

  • We bought these before moving to Hackintosh
  • I got mine pretty cheap ($59 Candian) - I didn't see any backlight of this quality cheaper
  • Why do I need a bigger command key?
  • UT2004, Halo: Combat Evolved, Rollercoaster Coaster 3 + Soaked all work as well and as fast on my Hack as old PC
  • The LCD is easily programmable by simple HTML code. (Not just for games, RSS feeds, event notifications, MSN messages while in fullscreen)
  • I hate Apples keyboards.

I don't understand your post. No one is suggesting you buy one, just a simple notification of software to make the LCD work. :D

Link to comment
Share on other sites

  • 1 month later...

Of course, LCD screen is nice (but I have to say that in current state LogitechLCDTool a bit unusable/not ready for normal usage with this permanent window, copy/paste of huge html chunks to this window and so on).

 

But I would really love to have full support for G-keys. Like in windows or linux. With all 3 sets and remaping on a fly.

Link to comment
Share on other sites

  • 8 months later...
Why:
  • We bought these before moving to Hackintosh
  • I got mine pretty cheap ($59 Candian) - I didn't see any backlight of this quality cheaper
  • Why do I need a bigger command key?
  • UT2004, Halo: Combat Evolved, Rollercoaster Coaster 3 + Soaked all work as well and as fast on my Hack as old PC
  • The LCD is easily programmable by simple HTML code. (Not just for games, RSS feeds, event notifications, MSN messages while in fullscreen)
  • I hate Apples keyboards.

I don't understand your post. No one is suggesting you buy one, just a simple notification of software to make the LCD work. ;)

Not to revive an old thread, but sorry about my older post. That was pretty rude of me, as it happens I too have a G15, but I honestly wish I hadn't bought it. The software for windows uses two little applications rather than one, and in OS X it's all but useless.

Link to comment
Share on other sites

  • 8 months later...
 Share

×
×
  • Create New...