Web Application for Polycom Phones UC Software 5.0.0
Polycom, Inc. 45
PolySoftKey.setSoftkeyLabel(int, string) Sets the label of a given custom soft key (0 to 3).
PolySoftKey.hideToolbar() Enables the application to hide the soft key toolbar.
PolySoftKey.showToolbar() Returns the soft key toolbar.
PolySoftKey.getSoftkeyPoint(int) Returns a JavaScriptON object with the X, Y coordinates of
the soft key. When used in combination with hideToolBar(), you can replace hard key button
events with any type of HTML object.
PolySoftKey.resetAllDefaults() Clears all custom defined key labels.
PolySoftKey.resetDefaultKey(int) Clears custom key label (0 to 3).
The PolySoftKey custom DOM extension example is shown next.
Table 34: PolySoftKey DOM Extension
PolySoftKey.customSoftkeyEvent.connect(skCallBack);
PolySoftKey.setSoftkeyLabel(0, "one");
PolySoftKey.setSoftkeyLabel(1, "Two");
PolySoftKey.setSoftkeyLabel(2, "Three");
PolySoftKey.setSoftkeyLabel(3, "Four");
function skCallBack(key, skEvent){
switch(key){
case 0:
document.getElementById("eventStuff").innerHTML = "SK 1 was pressed";
break;
case 1:
document.getElementById("eventStuff").innerHTML = "SK 2 was pressed";
break;
case 2:
document.getElementById("eventStuff").innerHTML = "SK 3 was pressed";
break;
case 3:
document.getElementById("eventStuff").innerHTML = "SK 4 was pressed";
break;
}
document.getElementById("eventValue").innerHTML = skEvent;
}
// hide the tool bar
function hideSKs(){
PolySoftKey.hideToolBar();
}
// show the tool bar
function showSKs(){
PolySoftKey.showToolBar();
}