Is it possible to catch keyboard inputs with Elixir/Erlang?

This is a highly platform-specific job, the method you need for “scraping” keyboard events depends on your operating system, desktop environment, etc. On linux you could read and parse raw events from /dev/input/*, which could be done with just elixir. For other solutions you’ll have to bind to native OS libraries; for example, on an X11 desktop you’d need something like the libxtst extension, on windows youll need to use SetWindowsHookEx(), or CGEventTapCreate() on mac os.

1 Like