kaluma-project / kaluma

A tiny JavaScript runtime for RP2040 (Raspberry Pi Pico)
https://kalumajs.org
Apache License 2.0
648 stars 37 forks source link

Normalize some keystrokes #579

Closed shreeve closed 1 year ago

shreeve commented 1 year ago

Changes reset from Ctrl+D (usually for exiting a CLI program) -> Ctrl+R (for "reset"). Also, makes the output after a reset a little more clear.

shreeve commented 1 year ago

This PR goes with one for kaluma-cli at https://github.com/kaluma-project/kaluma-cli/pull/36

communix commented 1 year ago

@shreeve The REPL command is compatible to the Node.js. So I want to keep the previous key.

shreeve commented 1 year ago
Monosnap node 2023-05-20 17-20-46

Ctrl+D exits the node REPL, no?

shreeve commented 1 year ago
$ node -v
v20.1.0
communix commented 1 year ago

@shreeve Yes, it's exit the node in Node.js. For the reset, Kaluma provide .reset command and it's recommended for soft reset. The reason we add CTRL+D is it's like a exit in Kaluma. Node.js runs on top of the shell and it goes to the shell when user want to exit from Node.js. Different from Node, Kaluma does not have any shell to go back. So when user want to exit it, Kaluma have to go back to Kaluma REPL. So it's the same as reset.