If the mobile phone monitors the input box, enter the @ character?

the usage scenario is mobile phone WeChat Mini Programs.
needs to enable the user to enter @ in the text box to jump to the contact"s page. My idea is to listen to input events and get the input key code, but look for the key code without @ on the Internet. So ask your seniors for help, is there another better way?


key code? Can't you directly compare = strings.


there are no keyboard events and no values on the phone. Events can be triggered by regular matching or indexof.

Menu