there is also "e.type" but i don't know what is its purpose.
It seems to be undocumented, but exactly what you're looking for: e.type==0 for short press, and e.type==2 for long press.
e.type==0
e.type==2
Edit: Only tested it on my Bangle.js 2, so it might not work on the Bangle.js 1. Also doesn't seem to work in the emulator.
Are you sure? Then it something is failing (on bjs2 emulator) because I got always an output 0. And Bangle.js has not implemented the e object
@rigrigrig started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
It seems to be undocumented, but exactly what you're looking for:
e.type==0
for short press, ande.type==2
for long press.Edit: Only tested it on my Bangle.js 2, so it might not work on the Bangle.js 1. Also doesn't seem to work in the emulator.