- Dragging the bars for programs to rearrange them
- Ctrl + right/left arrow to switch right or left a tab
- Right click a bar for a program to close it (Remove the coroutine)
This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
[1.6] fg and bg improvements
Started by apemanzilla, 28 March 2014 - 06:04 PMPosted 28 March 2014 - 07:04 PM
Two simple suggestions with the new shell system:
Edited on 31 March 2014 - 04:55 PM
Posted 29 March 2014 - 03:32 AM
I personally would like to be able to swipe down (there isn't anything to swipe to if you swipe up) the bar to kill the program's coroutine.
Posted 29 March 2014 - 07:28 AM
I agree with right clicking to closing, it's a bit of a pain having to hold down Ctrl + T.
Posted 31 March 2014 - 11:11 AM
What's wrong with typing "exit" to close a tab?
Personally, I'd love to have built-in hotkeys to switch to tabs. For instance ctrl+arrow to switch to the tab left or right.
Personally, I'd love to have built-in hotkeys to switch to tabs. For instance ctrl+arrow to switch to the tab left or right.
Posted 31 March 2014 - 04:03 PM
Exit dosn't work for all programs :/What's wrong with typing "exit" to close a tab?
Personally, I'd love to have built-in hotkeys to switch to tabs. For instance ctrl+arrow to switch to the tab left or right.
The tab only closes when the program decides to do so atm. Would be nice to be able to terminate the "thread" from outside the program
Posted 31 March 2014 - 06:12 PM
That only works for the shell( and other programs, IF they have programmed it to terminate when 'exit' is typed )What's wrong with typing "exit" to close a tab?
Personally, I'd love to have built-in hotkeys to switch to tabs. For instance ctrl+arrow to switch to the tab left or right.
But the CTRL+Arrow idea sounded cool, But as the OP suggested I would like to have the ability to drag the tabs.
Posted 31 March 2014 - 06:55 PM
Updated OP with ctrl + arrow suggestion
Posted 31 March 2014 - 08:02 PM
That would be buggy cause you can't detect button release, only button press. Unless he makes it so that the ctrl would be toggled, but again that would render the ctrl key useless in other programsUpdated OP with ctrl + arrow suggestion
Edited on 31 March 2014 - 06:04 PM
Posted 31 March 2014 - 10:40 PM
….That would be buggy cause you can't detect button release, only button press. Unless he makes it so that the ctrl would be toggled, but again that would render the ctrl key useless in other programsUpdated OP with ctrl + arrow suggestion
You realize that holding a key down sends constant key events, right?
Right?
Posted 31 March 2014 - 10:50 PM
Yes, but thos key events sometimes get lost and are not a good way of recording what keys that are beeing held down, and it only works for one key at a time, when another key is held down the key event for that key gets spammed the other one gets lost….That would be buggy cause you can't detect button release, only button press. Unless he makes it so that the ctrl would be toggled, but again that would render the ctrl key useless in other programsUpdated OP with ctrl + arrow suggestion
You realize that holding a key down sends constant key events, right?
Right?
Edited on 31 March 2014 - 08:53 PM
Posted 01 April 2014 - 02:16 AM
I think CC spams events for both keys if you hold down more than one.
Posted 01 April 2014 - 06:35 AM
O.oI think CC spams events for both keys if you hold down more than one.
Nope, dosn't do that. It is the keyboard that stops the spamming of the other keys, cause it only send type-events for one key at the time.
Edit:
So unless keyPressed and keyReleased events are added(unlikely) that would be buggy(not impossible tho)
Edited on 01 April 2014 - 04:37 AM
Posted 01 April 2014 - 11:44 AM
Nah, I don't think so.
You could just start a timer when the Ctrl key ist pressed and assign it to a variable. The timer (os.startTimer()) os just a short timer (~0.05s) and the variable will be set to nil if that timer is fired.
So if you press your second key the program will just check if the variable is nil, if not, your code will be executed.
Something like that should work.
You could just start a timer when the Ctrl key ist pressed and assign it to a variable. The timer (os.startTimer()) os just a short timer (~0.05s) and the variable will be set to nil if that timer is fired.
So if you press your second key the program will just check if the variable is nil, if not, your code will be executed.
Something like that should work.
Posted 01 April 2014 - 11:53 AM
Nah, I don't think so.
You could just start a timer when the Ctrl key ist pressed and assign it to a variable. The timer (os.startTimer()) os just a short timer (~0.05s) and the variable will be set to nil if that timer is fired.
So if you press your second key the program will just check if the variable is nil, if not, your code will be executed.
Something like that should work.
Yes, but then you can't go forth and back between the tabs.
Lets say you hold ctrl then press the left key, after that you won't be able to press the right arrow to go back.
Edited on 01 April 2014 - 09:54 AM
Posted 01 April 2014 - 01:01 PM
>facedesk<Nah, I don't think so.
You could just start a timer when the Ctrl key ist pressed and assign it to a variable. The timer (os.startTimer()) os just a short timer (~0.05s) and the variable will be set to nil if that timer is fired.
So if you press your second key the program will just check if the variable is nil, if not, your code will be executed.
Something like that should work.
Yes, but then you can't go forth and back between the tabs.
Lets say you hold ctrl then press the left key, after that you won't be able to press the right arrow to go back.
Ok. Every time you hold the control key down, it spams "key" events. You then check for two key events, for the control key and right key, in close proximity. Then you switch tabs. If there's a control event and a left arrow key event in close proximity, switch left a tab. It's not really that hard.
Posted 01 April 2014 - 01:25 PM
Yes, but that only works once. After pressing another button you wont get any more events for the control key, which would be anoying :P/>>facedesk<Nah, I don't think so.
You could just start a timer when the Ctrl key ist pressed and assign it to a variable. The timer (os.startTimer()) os just a short timer (~0.05s) and the variable will be set to nil if that timer is fired.
So if you press your second key the program will just check if the variable is nil, if not, your code will be executed.
Something like that should work.
Yes, but then you can't go forth and back between the tabs.
Lets say you hold ctrl then press the left key, after that you won't be able to press the right arrow to go back.
Ok. Every time you hold the control key down, it spams "key" events. You then check for two key events, for the control key and right key, in close proximity. Then you switch tabs. If there's a control event and a left arrow key event in close proximity, switch left a tab. It's not really that hard.
Sorry if I didn't make that clear in my earlier post
Edited on 01 April 2014 - 11:27 AM
Posted 01 April 2014 - 01:45 PM
You don't need more control key events. You assume the button is pressed as long as they keep pressing right or left in quick proximity, then after a second or two of unrelated events assume the control key has been released.Yes, but that only works once. After pressing another button you wont get any more events for the control key, which would be anoying :P/>>facedesk<Nah, I don't think so.
You could just start a timer when the Ctrl key ist pressed and assign it to a variable. The timer (os.startTimer()) os just a short timer (~0.05s) and the variable will be set to nil if that timer is fired.
So if you press your second key the program will just check if the variable is nil, if not, your code will be executed.
Something like that should work.
Yes, but then you can't go forth and back between the tabs.
Lets say you hold ctrl then press the left key, after that you won't be able to press the right arrow to go back.
Ok. Every time you hold the control key down, it spams "key" events. You then check for two key events, for the control key and right key, in close proximity. Then you switch tabs. If there's a control event and a left arrow key event in close proximity, switch left a tab. It's not really that hard.
Sorry if I didn't make that clear in my earlier post
Posted 01 April 2014 - 01:52 PM
Just throwing out my opinion, but I, for one, would find sort of implementation more than a tad annoying. I'd keep letting go of Ctrl after a switch, pushing arrow keys to interact with whatever script I'd switched to, then swearing as Multishell decided to switch tabs again.
It beats me why there aren't release events. I assume they're very hard to capture… for whatever reason… but they'd be very nice to have.
It beats me why there aren't release events. I assume they're very hard to capture… for whatever reason… but they'd be very nice to have.
Posted 01 April 2014 - 02:32 PM
Just throwing out my opinion, but I, for one, would find sort of implementation more than a tad annoying. I'd keep letting go of Ctrl after a switch, pushing arrow keys to interact with whatever script I'd switched to, then swearing as Multishell decided to switch tabs again.
It beats me why there aren't release events. I assume they're very hard to capture… for whatever reason… but they'd be very nice to have.
Not shure how minecraft handles key inputs, but shouldn't be too hard.
-snip-
That would be hard to get used to.
What he could implement is that you press ctrl or alt to toggle the shell into/outof a tab switching mode.
Edited on 01 April 2014 - 12:34 PM
Posted 14 April 2014 - 05:24 AM
The keyboard shortcut coroutine from LuaIDE works perfectly for me. Just use that.