Keyboard class of PicoRuby

Type aliases

debounce_type

:none
                     | :per_row
                     | :per_key

debouncer_type

DebounceNone
                      | DebouncePerRow
                      | DebouncePerKey

scan_mode_type

:matrix
                      | :direct

append_type

RGB
                   | RotaryEncoder
                   | VIA
                   | Joystick
                   | Mouse
                   | Sounder
                   | DebounceNone
                   | DebouncePerRow
                   | DebouncePerKey

anchor_type

:left
                   | :right

split_style_type

:standard_split
                        | :right_side_flipped_split

layer_t

{
    on_release:        Integer | Array[Integer] | Proc | nil,
    on_hold:           Integer | Symbol | Proc,
    release_threshold: Integer,
    repush_threshold:  Integer
  }

mode_key_t

{
    prev_state:  Symbol,
    pushed_at:   Integer,
    released_at: Integer,
    layers:      Hash[Symbol, layer_t]
  }

Singleton methods

autoreload_off

Keyboard.autoreload_off() -> void

autoreload_ready?

Keyboard.autoreload_ready?() -> bool

new

Keyboard.new-> instance

reload_keymap

Keyboard.reload_keymap() -> void

restart

Keyboard.restart() -> void

wait_keymap

Keyboard.wait_keymap() -> void

Instance methods

action_on_release

instance.action_on_release(Integer | Array[Integer] | Proc | nil mode_key) -> void

add_layer

instance.add_layer(Symbol name, Array[ Symbol | Array[Symbol] ] map) -> void

anchor?

instance.anchor?-> bool

append

instance.append(append_type feature) -> void

before_report

instance.before_report() { (Keyboard) -> void } -> void

bootsel!

instance.bootsel!-> void

calculate_col_position

instance.calculate_col_position(Integer col_index) -> Integer

convert_composite_keys

instance.convert_composite_keys(Array[Symbol] keys) -> Array[Integer]

define_composite_key

instance.define_composite_key(Symbol key_name, Array[Symbol] keys) -> void

define_mode_key

instance.define_mode_key(Symbol key_name, [Symbol | Array[Symbol] | Proc | nil, Symbol | Proc | nil, Integer?, Integer?] param, ?bool from_via) -> void

delete_mode_keys

instance.delete_mode_keys(Symbol layer_name) -> void

entire_cols_size

instance.entire_cols_size() -> Integer

eval

instance.eval(String) -> void

find_keycode_index

instance.find_keycode_index(Symbol key) -> (Integer | Symbol)

get_layer

instance.get_layer(Symbol | nil name, Integer num) -> ( Array[Array[Integer | Symbol | Proc]] | nil )

init_direct_pins

instance.init_direct_pins(Array[Integer] pins) -> void

init_matrix_pins

instance.init_matrix_pins(Array[Array[Array[Integer] | nil]] matrix) -> void

init_pins

instance.init_pins(Array[Integer] rows, Array[Integer] cols) -> void

init_uart

instance.init_uart() -> void

inject_switch

instance.inject_switch(Integer col, Integer row) -> void

invert_sft

instance.invert_sft-> void

key_pressed?

instance.key_pressed?() -> bool

keys_include?

instance.keys_include?(Symbol key) -> bool

lock_layer

instance.lock_layer(Symbol layer_name) -> void

lower_layer

instance.lower_layer-> void

macro

instance.macro(String text, ?::Array[Symbol] opt) -> void

mutual_uart_at_my_own_risk=

instance.mutual_uart_at_my_own_risk=(bool) -> void

on_start

instance.on_start() { (Keyboard) -> void } -> void

output_report_changed

instance.output_report_changed() { (Integer) -> void} -> void

raise_layer

instance.raise_layer-> void

resolve_key_alias

instance.resolve_key_alias(Symbol sym) -> Symbol

ruby

instance.ruby() -> void

scan_direct!

instance.scan_direct!() -> void

scan_matrix!

instance.scan_matrix!() -> void

send_key

instance.send_key(*untyped) -> void

set_anchor

instance.set_anchor(anchor_type val) -> void

set_debounce

instance.set_debounce(debounce_type type) -> void

set_debounce_threshold

instance.set_debounce_threshold(Integer val) -> void

set_scan_mode

instance.set_scan_mode(scan_mode_type mode) -> void

signal_partner

instance.signal_partner(Symbol key) { (Keyboard) -> void } -> void

skip_position?

instance.skip_position?(Integer row_index, Integer col_index) -> bool

split_style=

instance.split_style=(Symbol style) -> void

start!

instance.start!-> void

start_features

instance.start_features-> void

uart_anchor

instance.uart_anchor(Integer) -> Integer

uart_anchor_init

instance.uart_anchor_init(Integer) -> void

uart_partner

instance.uart_partner() -> Integer

uart_partner_init

instance.uart_partner_init(Integer) -> void

uart_partner_push8

instance.uart_partner_push8(Integer) -> void

unlock_layer

instance.unlock_layer() -> void

via=

instance.via=(bool val) -> void

via_layer_count=

instance.via_layer_count=(Integer count) -> void

Attr accessors

split (accessor)

instance.split -> bool

uart_pin (accessor)

instance.uart_pin -> Integer

default_layer (accessor)

instance.default_layer -> Symbol

sounder (accessor)

instance.sounder -> Sounder

modifier (accessor)

instance.modifier -> Integer

layer (reader)

instance.layer -> Symbol | nil

split_style (reader)

instance.split_style -> split_style_type

cols_size (reader)

instance.cols_size -> Integer

rows_size (reader)

instance.rows_size -> Integer

keycodes (reader)

instance.keycodes -> Array[Integer]
Tags: class