mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
25e6470499
+ moved keycode translation to KeycodeTranslator + made KeycodeTranslator more generic to handle 0-9 and a-z keys + small refactor in KeyboardEventService
18 lines
417 B
JavaScript
18 lines
417 B
JavaScript
(function () {
|
|
var ns = $.namespace('service.keyboard');
|
|
|
|
ns.KeyboardEvent = function (eventName, args, description) {
|
|
this.eventName = eventName;
|
|
this.args = args;
|
|
this.description = description;
|
|
};
|
|
|
|
ns.KeyboardEvent.prototype.fire = function () {
|
|
$.publish(this.eventName, this.args);
|
|
};
|
|
|
|
ns.KeyboardEvent.prototype.getDescription = function () {
|
|
return this.description;
|
|
};
|
|
})();
|