Rishabh-malhotraa / caucus

Realtime Collaborate Editor with Embedded Compiler
https://caucus.rishabhmalhotra.in/
MIT License
297 stars 70 forks source link

Keybinds to run Code: shift+Enter #23

Closed Rishabh-malhotraa closed 3 years ago

Rishabh-malhotraa commented 3 years ago

Set a keybind in code-mirror editor to run a function which makes an API call to run the code!

Ranadheer-senani commented 3 years ago

Hey Rishabh, I personally feel using any function keys is more relevant and easy to implement.

Rishabh-malhotraa commented 3 years ago

@Ranadheer-senani Thanks for the input. I am thinking more along the lines of Ctrl + ' similar to leetcode. Regardless I am a bit busy with my placements, if you want to delve into the code base and want to take a jab at trying to implement this feature do let me know, I can guide you with that.

Ranadheer-senani commented 3 years ago

Yeah, I'd like to try,

all the best with your exams mate.

MarufSharifi commented 3 years ago

could i take this issue?

Rishabh-malhotraa commented 3 years ago

I have assigned you this issue, do let me know if you run into any difficulties.

You need to map an on-keypress function to the codemirror instance, which on pressing Ctrl + ' executes the function which makes the API call to the backend (that does remote code execution).