なんとなくこんなの作った。 var KeyCommand = Class.create(); KeyCommand.prototype = { initialize: function() { this.map = []; this.key_history = ''; Event.observe(document, 'keyup', this.observer.bind(this)); }, observer: function (event) { this.key_history += "/" + event.keyCode; for(i=0, len=this.map.length; i < len; i++) { if (this.key_history.indexOf(this.map[i].command) > -1) { this.map[i].callback(); this