pixl-xyapp 2.1.22 → 2.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/js/select.js +12 -1
- package/package.json +1 -1
package/js/select.js
CHANGED
|
@@ -1105,11 +1105,22 @@ var KeySelect = {
|
|
|
1105
1105
|
return parts.join('+');
|
|
1106
1106
|
},
|
|
1107
1107
|
|
|
1108
|
-
|
|
1108
|
+
getKeyLabel(key_id, glue = '+') {
|
|
1109
1109
|
// get formatted label based on key id
|
|
1110
1110
|
var os = app.os;
|
|
1111
1111
|
return key_id.split(/\+/).map( function(key) {
|
|
1112
1112
|
if (key == 'Meta') return os.mac ? 'Command' : (os.win ? 'Windows' : 'Super');
|
|
1113
|
+
else if (key == 'Alt') return os.mac ? 'Option' : 'Alt';
|
|
1114
|
+
else return key.replace(/^(Key|Digit)/, '');
|
|
1115
|
+
} ).join(glue);
|
|
1116
|
+
},
|
|
1117
|
+
|
|
1118
|
+
getShortKeyLabel(key_id, glue = '+') {
|
|
1119
|
+
// get formatted label based on key id
|
|
1120
|
+
var os = app.os;
|
|
1121
|
+
return key_id.split(/\+/).map( function(key) {
|
|
1122
|
+
if (key == 'Meta') return os.mac ? 'Cmd' : (os.win ? 'Win' : 'Super');
|
|
1123
|
+
else if (key == 'Alt') return os.mac ? 'Opt' : 'Alt';
|
|
1113
1124
|
else return key.replace(/^(Key|Digit)/, '');
|
|
1114
1125
|
} ).join(glue);
|
|
1115
1126
|
}
|
package/package.json
CHANGED