How I trigger the “System Bell” in nodejs

Output the BELL character (Unicode 0007) to the standard output.

console.log('\u0007');

Update 2023

Solution above doesn’t work anymore, but writing directly to stdout still works (tested on Node.js v14.20):

process.stdout.write('\u0007');

References

  • ASCII/ISO 8859 (Latin-1) Table

  • Unicode Characters: 00000 to 000FF

  • The Open Group Base Specifications Issue 7: Portable Character Set

  • Programming with Unicode Documentation (unicodebook.pdf)

  • How a bullet turns into a beep – The Old New Thing

  • Unicode 10.0.0 Final Names List

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)