r/linux_programming • u/Techdesciple • Feb 24 '21
A mouse based Terminal Emulator.
I made a post yesterday here and it got me thinking that maybe someone should make a Terminal Emulator that is capable of 100 percent mouse. It seems they do not exist. I am not a programmer. At least not yet. So, I figured I would post the idea somewhere and see if anyone takes it. If you want it you can have it.
But, basically I just want someone to make a Terminal that uses the mouse instead of the keyboard. Which everyone wants to use the keyboard more than anything. But, I think it would be possible to use the mouse just as efficiently.
You could just set up a series of functions based around the mouse. Some mice have multiple buttons on it. Mine has 4 " buttons " and a scroll wheel with a click function. That is 7 actions. The common user usually has at least 2 fingers on the mouse. But, I often have 4 on the mouse. That means I can take 7 buttons and combine it with 4 different combinations. That is actually a lot of functionality.
Most terminal functions are the same. You could even make a .conf file that allows you modify what is programmed into the mouse terminal.
As an example I could use Button 4 + scroll for a list of apt-get commands. I could use Button 5 + scroll for a sequence of other commands. I could set just scroll as a common commands and then right click + scroll for common arguments. Right clicking could give the user a very large series arguments based on what they are right clicking. And that is only a small selections of the combinations you could achieve. it doesn't even cover. Button 4 + 5 + right-click + scroll, ect ,ect ,ect.
and of course you would have to give it hardware acceleration.
View all comments
Show parent comment
0
u/Techdesciple Feb 24 '21 edited Feb 24 '21
What do mean?
Like I said I am not a programmer. So, the actually implementation is really subject to whoever programs or rather " If " someone programs it.
But, the general idea is merely.
That is it.
But, by functionally I mean 90 to 95 percent of the functions would have to be capable with a mouse.
But, because we are only using a series of button combinations and a scroll wheel. You could do this same function with another input like a "Game Controller". It is just another input. Basically a mouse. the PS4 and PS5 controller even have a touch pad on it. Which if the programmer wanted to could be programmed to implement a series of gestures.
But, to simplify the whole idea I will just stick with a mouse as an example because that is easier I guess for an argument.
So, you have a mouse and this mouse can do many different button combinations. With a scroll wheel. The scroll wheel in my mind is really the key to make this work. But, again the person who decides to program it would really be able to use their own creative input.
But, in a .conf file you would just have a series of programmable functions. That are activated by using button combinations on a mouse and then when you scroll you would cycle through those functions that are pre-programmed.
Example Mouse button 4 + scroll( up and down) would move you through a list of
*1. apt get update *2. apt get install *3. apt get upgrade *4. apt get remove
You could add more to the list. I mean in theory you could have as many as you wanted in the list as you were willing to scroll through.
You could even have another combinations
Mouse 5 + scroll ( up and down ) *1. awk *2. curl *3. grep.
Then you could set it up that if you highlight a line and right click you could add {} or [] or " " or ' ' to a line.
Past that it really boils down to how the programmer programs it. Because I am not a programmer I do not know all the codes and combinations needed to do a lot of things. so I can only give the general idea
But, if you take the mouse button combinations PLUS the use a scroll menu function you get A LOT of possibilities.
Obviously, this is counter intuitive to the general use of terminal. Most videos on youtube I have seen want people to use terminal with a keyboard. So, they try to remove the mouse as much as possible. But, I like using the mouse and I think there might be people out there that would think it would be neat. Especially, if you put in the ability to use a game controller in terminal or you think about the idea of people using Linux on a smart phone. If you switch out button combinations on a mouse to gestures on a phone or tablet there would probably be people who want that. Because linux phones are what some people want.
Edit: I just wanted to add more about the gestures on a smart phone. If you use the volume button as a scroll you could use the gestures in place of mouse funtions. Gestures I can think of would be an X, Z , up and down, up , circle, double tap. triple tap, 2 finger squeeze, 3 finger squeeze and there are probably more. Each one would just activate a new scroll function in terminal.