How to kill the keyboard in Firefox OS Simulator
I want to run some Firefox OS apps in my PC. So I'm using a big-sized Firefox OS Simulator.
The problem is that the keyboard grows huge and covers too much space:
Since this is in fact running on my PC, I use the physical keyboard instead of the Firefox OS one.
So I don't want this keyboard. Is there a way to remove it?
- Open the profile folder of Firefox:
- Go to
about:support
- Find the "Application Basics" section
- Find the "Profile Folder" entry in the table
- Click the "Show Folder" button
- Go to
- Go to the
extensions
subfolder - Find the folder of your simulator, e.g.
[email protected]
- Go to
b2g
subfolder - Go to
modules
subfolder - Open the
Keyboard.jsm
with a text editor. -
Find the
_messageNames
array initializer:_messageNames: [ 'RemoveFocus', 'SetSelectionRange', 'ReplaceSurroundingText', 'ShowInputMethodPicker', 'SwitchToNextInputMethod', 'HideInputMethod', 'GetText', 'SendKey', 'GetContext', 'SetComposition', 'EndComposition', 'Register', 'Unregister' ],
-
Comment
'Register'
:_messageNames: [ 'RemoveFocus', 'SetSelectionRange', 'ReplaceSurroundingText', 'ShowInputMethodPicker', 'SwitchToNextInputMethod', 'HideInputMethod', 'GetText', 'SendKey', 'GetContext', 'SetComposition', 'EndComposition', /*'Register',*/ 'Unregister' ],
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();