Current section
Files
Jump to
Current section
Files
src/butterbee@key.erl
-module(butterbee@key).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
-define(FILEPATH, "src/butterbee/key.gleam").
-export([mouse_button_to_int/1]).
-export_type([mouse_button/0]).
-if(?OTP_RELEASE >= 27).
-define(MODULEDOC(Str), -moduledoc(Str)).
-define(DOC(Str), -doc(Str)).
-else.
-define(MODULEDOC(Str), -compile([])).
-define(DOC(Str), -compile([])).
-endif.
?MODULEDOC(
" A collection of special keys for use with the \n"
" [`action.enter_keys`](https://hexdocs.pm/butterbee/action.html#enter_keys/2) function.\n"
"\n"
" NOTE: This module has been slopped together from a claude prompt.\n"
" If a key doesn't work, it's probably a hallucination.\n"
" Please [open an issue](https://codeberg.org/gelei/butterbee/issues/new) if you find one.\n"
).
-type mouse_button() :: left_click | right_click.
-file("src/butterbee/key.gleam", 14).
?DOC(false).
-spec mouse_button_to_int(mouse_button()) -> integer().
mouse_button_to_int(Click) ->
case Click of
left_click ->
0;
right_click ->
1
end.