github neutralinojs/neutralinojs v6.6.0
Neutralinojs v6.6.0 released!

latest releases: v6.7.0, nightly
5 hours ago

What's new

API: Input device simulation and handling

New functions were added to the computer namespace to update the mouse position, confine the mouse cursor within the window, and simulate keyboard events. These functions work on Windows and macOS, but only work under the X windowing system on Linux (or FreeBSD). On Wayland, these functions will throw NE_CO_UNLTOSC, NE_CO_UNLTOMG, or NE_CO_UNLTOSK error messages.

  • Implement computer.setMousePosition(x, y) to update the current mouse cursor position.
  • Implement computer.setMouseGrabbing(grabbing; boolean) to activate/deactivate confining the mouse cursor within the native app window. If grabbing is set to true, the mouse cursor always stays within the window boundaries, so this feature helps create interactive games and similar apps operated using the mouse.
  • Implement computer.sendKey(keyCode, keyState) to simulate keyboard events. App developers can use a platform-specific key code and states (press, down, and up) to simulate from simple single key strokes to complex key combinations:
// Simulate letter 'a' press on GNU/Linux:
await Neutralino.computer.sendKey(38)

// Simulate Ctrl + V keyboard shortcut on GNU/Linux:
await Neutralino.computer.sendKey(105, 'down')    // Hold right control
await Neutralino.computer.sendKey(47, 'down')     // Hold letter 'v' 
await Neutralino.computer.sendKey(47, 'up')       // Release letter 'v'
await Neutralino.computer.sendKey(105, 'up')      // Release right control

API: os

  • Add useTemplateIcon: bool option to os.setTray(options) for activating adaptive tray icon with the current color-scheme on macOS.

Improvements/bugfixes

  • Display the app icon properly with the os.showNotification() function when the app is launched from a Mac app bundle.
  • Fix the window-ordering issue with window.focus() on macOS.
  • Auto-focus the app window when the Mac dock app icon is clicked.
  • Write full C++ exception messages to the terminal to improve the framework-related bug-reporting experience.

Update the config file option cli.binaryVersion with 6.6.0 and enter neu update to fetch this version.

Get started: https://neutralino.js.org/docs


This release was auto-generated by ReleaseZri 🚀

Don't miss a new neutralinojs release

NewReleases is sending notifications on new releases.