-
Notifications
You must be signed in to change notification settings - Fork 53
Debug print
HASUMI Hitoshi edited this page May 12, 2022
·
3 revisions
You can see debug print on a "USB Serial Port" (so-called "COM Port" in Windows) that will be helpful if your keymap.rb
doesn't work well:
Key | Value |
---|---|
Baud | 115200 |
Data bits | 8 |
Parity | None |
Stop bits | 1 |
Flow control | None |
(Valid version: 0.9.14+)
PRK has a built-in method, PicoRubyVM.print_alloc_stats
, which prints memory statistics of the PicoRuby virtual machine.
You can assign this method to a key as below:
kbd.add_layer :default, %i(STATS KC_A KC_B KC_C)
kbd.define_mode_key :STATS, [ Proc.new { PicoRubyVM.print_alloc_stats }, nil, 300, nil ]
Tapping STATS key shows current statistics in the serial console like this:
ALLOC STATS
TOTAL 204800
USED 67700
FREE 136756
FRAG 55
FRAG stands for the count of fragmentation. The other three values are in bytes.
- Getting started
- Keyboard features
- Keycodes (ja)
- Mouse (ja)
- Layers and mode key (ja)
- Debounce
- Composite key
- Split-type keyboard
- Keyscan matrix
- Num Lock, Caps Lock and Scroll Lock
- Useful methods that make you free
- BIOS mode
- Other features
- Examples
- Development
- Contribute to the Wiki
- FAQ