Bug 1027670 - Add IME that handle LaTeX

Store this calculation  `keyboard.app.inputContext.selectionStart + selectionRange` inside a meaningful variable.