Как убить клавиатуру в Firefox OS Simulator

356
Oriol

Я хочу запустить некоторые приложения Firefox OS на моем ПК. Поэтому я использую симулятор Firefox OS большого размера .

Проблема в том, что клавиатура становится огромной и занимает слишком много места:

Как убить клавиатуру в Firefox OS Simulator

Поскольку на самом деле это работает на моем ПК, я использую физическую клавиатуру вместо операционной системы Firefox.

Так что я не хочу эту клавиатуру. Есть ли способ удалить это?

3

1 ответ на вопрос

2
Oriol
  1. Open the profile folder of Firefox:
    1. Go to about:support
    2. Find the "Application Basics" section
    3. Find the "Profile Folder" entry in the table
    4. Click the "Show Folder" button
  2. Go to the extensions subfolder
  3. Find the folder of your simulator, e.g. fxos_2_2_simulator@mozilla.org
  4. Go to b2g subfolder
  5. Go to modules subfolder
  6. Open the Keyboard.jsm with a text editor.
  7. Find the _messageNames array initializer:

    _messageNames: [ 'RemoveFocus', 'SetSelectionRange', 'ReplaceSurroundingText', 'ShowInputMethodPicker', 'SwitchToNextInputMethod', 'HideInputMethod', 'GetText', 'SendKey', 'GetContext', 'SetComposition', 'EndComposition', 'Register', 'Unregister' ], 
  8. Comment 'Register':

    _messageNames: [ 'RemoveFocus', 'SetSelectionRange', 'ReplaceSurroundingText', 'ShowInputMethodPicker', 'SwitchToNextInputMethod', 'HideInputMethod', 'GetText', 'SendKey', 'GetContext', 'SetComposition', 'EndComposition', /*'Register',*/ 'Unregister' ], 
  9. Restart the Simulator (no need to restart Firefox)

Now focusing a text field won't open the keyboard, but you will be able to write with the physical one. Focusing a select will still display a dialog to choose some option.

If you want to disable the keyboard completely (including select), instead of 'Register' scroll to the end of the file and comment this line:

this.Keyboard.init(); 

enter image description here