pressing equals (=) key inserts a fraction instead of equal sign
When pressing the equals key on my keyboard, after inserting a matrix, a fraction gets inserted instead of a equals sign (=). I'm not using a standard qwerty keyboard (I'm using azerty), just pressing the key just types a normal equals sign (and I don't need to press ctrl/alt/shift or something). Typing a slash(/) also inserts a fraction.
It's not because I broke something on my project because typing it on the interactive Mathfield on the CortexJS website also inserts a fraction.
I imagine providing information from this site may aid in fixing this issue: https://www.toptal.com/developers/keycode e.g.
Good idea! The problem seems to be that the code represents a slash and mathlive checks the event.code and not the event.key.
Could you provide more details on what keys you pressed between the time the mathfield is created and the time you press the "=" key?
The problem is that the mathfield tries to guess your keyboard layout, and it uses the sequence of keys you press to do so. Pressing "=" on an AZERTY keyboard should switch it to the AZERTY layout, but somehow the sequence of keys you pressed before pressing "=" had the mathfield convinced you were not using an AZERTY layout...
FYI, you can work around this by explicitly setting the locale on the mathfield: mf.locale = "fr". This should set the AZERTY layout by default.