How to setup Toggle Key to display the shell script output during execution? - bash

In my team they have asked me to create a shell script with toggle key option to display the command output/errors when a arrow key is pressed. And it need to hide the output when the same arrow key is pressed. Is there a way we can achieve this using a shell script?
I don't have a solution yet but the script which we are using now is throwing so many output and its making the screen loaded without so many lines of std output/errors during execution. And we would like to hide the output using the toggle key and when needed if we press a key it needs to display the output during execution.
No idea on how to start with this. Need some idea or thoughts on how to achieve this?
Expected:
Shrink the output using toggle key (say for example UP arrow key) and when needed if we press the same UP arrow key it need to display the output again.
Actual:
No code available as of now to do this function.

Related

Doing something if any key is pressed

I was wondering how to make a script so every time I click a key on my keyboard the script runs my wanted commands and loop

Scripting in QWS3270P Pulse mainframes.

I'm using qws3270P emulator to interact with mainframe. I just want to build/develop some script files. So that i can do 30m long repetitive process just by running the script file. The file format the emulator is accepting is .scr format. I have done a lot of research on it but i could not conclude with one. My interface has 3 screen to go to ISPF utilities. In first screen i need to type k, then enter, then next screen a, then next screen i need to enter User name and password, then enter then i will land to ISPF utilities
key "enter"
type "k"
Key "enter"
type "a"
key "enter"
type "username"
key "Tab"
key "password"
key "enter"
type "ispf"
In that emulator i could not able to go ispf. All the thing are projecting in Very first screen itself. Can anyone help me with this scripting code ?. i tried by using wait syntax also

How to run a function in the terminal everytime a key is pressed(bind the whole keyboard)

I have been playing with bash for the past week and would like to create a function that is called every time I press a key on the keyboard.
I read about bind but it forces me to bind to a specific key.
If anybody can assist me I would appreciate it
I would like to accomplish this without new shells like zsh or fish

Automatic Generate Input without shift+enter Mathematica 10

I have a little problem with my program. I have a function which is call funkcja where I do some small operations and at the end an output is show by Graphics function.
Then, in function Manipulate, I use my funkcja and some boxes to manipulate in parameters of my function.
The issue is that I can't make it automatically show output of funkcja when I open my project, without pressing SHIFT+ENTER.
Is there any way to make this automatic when I open my project?
Currently I have this when I open my project:
http://postimg.org/image/5o1qcxkjb/
This is what I want to have when I open my project:
http://postimg.org/image/f3kxhlosf/
To my understand, you have to press keyboard to run the code in Mathematica .nb file.
However, if you want to be automatic without press the keyboard, you can export your Mathematica .nb file to .CDF standlone file(under menu there is a export). As a .CDF you dont need to press keyboard to run the code.
Hope this would help.

Completion popup closes after pressing Enter twice

I'm using Qt Creator 3.1.1 with FakeVim mode enabled.
When the completion popup appears with the desired function already as the first one, I have to press Enter twice in order to insert text. The same thing happens when I want to insert more letters before hitting Enter. I have to press first key twice, than everything goes as expected (following keys require single presses, Enter too).
ex. I entered avform and the popup appeared. If I want the first tooltip AVFormatContext i press Enter twice. If I want avformat_smthing I need to press aaform_ cause the first a will like change mode back to insert (but not really as I'm still in INSERT mode).
I wonder if anybody stumbled upon similar problem/inconvenience, and what can I do to change QtCreator behavior.
It seems like it's a known bug, and it hasn't been fixed yet. It only appears in newer versions of Qt-creator (>2.8.1). Partial fix is to disable autocompletion or unmark Pass keys in insert mode but both options have side effects (ex.Ctrl+N opens completion popup, but the text doesn't get inserted).
Link to: Issue on BugTracker for curious.

Resources