From 5d6d9ae0df8779b4f49a1cbc6bfcc07c6d7aa308 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Thu, 20 Nov 2014 22:53:49 -0600 Subject: [PATCH] cleaner version --- examples/hotPlaces.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/hotPlaces.js b/examples/hotPlaces.js index e674edde4b..cb826837ae 100644 --- a/examples/hotPlaces.js +++ b/examples/hotPlaces.js @@ -10,8 +10,7 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -function keyPressEvent(event) { - // if our tools are off, then don't do anything +Controller.keyPressEvent.connect(function (event) { if (event.text == "1") { Window.location = "hifi://starchamber"; } else if (event.text == "2") { @@ -25,5 +24,4 @@ function keyPressEvent(event) { } else if (event.text == "6") { Window.location = "hifi://hoo"; } -} -Controller.keyPressEvent.connect(keyPressEvent); \ No newline at end of file +});