question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Suppress Enter don't work when using echo_newline extension

See original GitHub issue

I’ve tried

keypress : function(event) {
   if(event.key === "Enter"){
      event.preventDefault();
      event.stopPropagation();
      return false;
   }
},
keydown : function(event) {
   if(event.key === "Enter"){
      event.preventDefault();
      event.stopPropagation();
      return false;
   }
},
keymap : {
   ENTER : function(event){
      event.preventDefault();
      event.stopPropagation();
   }
}

but pressing ENTER still makes a new line in the terminal.

TODO:

  • fix echo_newline keymap option with ENTER
  • fix echo_newline keymap method with ENTER
  • document workings of keymap and events.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
jcubiccommented, Apr 19, 2021

The PR was merged to only documentation the working on events is needed here.

0reactions
hoodmanecommented, Feb 27, 2021

I think my PR will handle bullets 1 and 2 in the TODO here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add new lines when using echo - Unix Stack Exchange
A nice simple "-e" option to get escape sequences working - it says on another answer that echo is unreliable and doesn't follow...
Read more >
Echo newline in Bash prints literal \n - Stack Overflow
This works both inside a script and from the command line. On the command line, press Shift + Enter to do the line...
Read more >
echo text with new line in bash - linux - Super User
I guess that you want to add an extra line before that text, probably because your initial file doesn't end in a new...
Read more >
Bash Reference Manual - GNU.org
If a \newline pair appears, and the backslash itself is not quoted, the \newline is treated as a line continuation (that is, it...
Read more >
Why does bash remove \n in $(cat file)? - Ask Ubuntu
Probably the input of echo is separated by newlines, and it will handle it as separate commands, so the result will be without...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found