diff --git a/guacamole/src/main/webapp/app/client/controllers/clientController.js b/guacamole/src/main/webapp/app/client/controllers/clientController.js index 0b9ad5f2f..6e4f27509 100644 --- a/guacamole/src/main/webapp/app/client/controllers/clientController.js +++ b/guacamole/src/main/webapp/app/client/controllers/clientController.js @@ -192,8 +192,8 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams autoFit : true, /** - * The currently selected input method. This may be either "none", - * "osk", or "text". + * The currently selected input method. This may be any of the values + * defined within preferenceService.inputMethods. * * @type String */ diff --git a/guacamole/src/main/webapp/app/settings/services/preferenceService.js b/guacamole/src/main/webapp/app/settings/services/preferenceService.js index ab946908b..ade3c7228 100644 --- a/guacamole/src/main/webapp/app/settings/services/preferenceService.js +++ b/guacamole/src/main/webapp/app/settings/services/preferenceService.js @@ -36,6 +36,43 @@ angular.module('settings').factory('preferenceService', ['$injector', // The parameter name for getting the history from local storage var GUAC_PREFERENCES_STORAGE_KEY = "GUAC_PREFERENCES"; + /** + * All valid input method type names. + * + * @type Object. + */ + service.inputMethods = { + + /** + * No input method is used. Keyboard events are generated from a + * physical keyboard. + * + * @constant + * @type String + */ + NONE : 'none', + + /** + * Keyboard events will be generated from the Guacamole on-screen + * keyboard. + * + * @constant + * @type String + */ + OSK : 'osk', + + /** + * Keyboard events will be generated by inferring the keys necessary to + * produce typed text from an IME (Input Method Editor) such as the + * native on-screen keyboard of a mobile device. + * + * @constant + * @type String + */ + TEXT : 'text' + + }; + /** * All currently-set preferences, as name/value pairs. Each property name * corresponds to the name of a preference. @@ -53,12 +90,12 @@ angular.module('settings').factory('preferenceService', ['$injector', emulateAbsoluteMouse : true, /** - * The default input method. This may be either "none", "osk", or - * "text". + * The default input method. This may be any of the values defined + * within preferenceService.inputMethods. * * @type String */ - inputMethod : 'none' + inputMethod : service.inputMethods.NONE };