Getting rid of F12 for command line
Rick Murray (539) 13840 posts |
My server was “down” all day. At some stage, something (probably furry) pressed the F12 key, so the machine spent the entire day sitting in the command line. I’ve had just about enough of F12. So I’m going to nuke it. But, wait, there’s still a use to getting to a single tasking command line. So what I’ll be doing instead of wiping out the keypress entirely, is to change it to be Shift-F12 instead. If furry objects can figure that out, it’ll be time for me to retire and give my computers to the cats… The proper method Open …castle.RiscOS.Sources.Desktop.Switcher.s.Switcher and look for “key_shellcli”. You should find:
Change the &1CC to be &1DC and rebuild. The improper method As I don’t have the RISC OS build environment set up on this machine (new SD card, not had the time to download and unpack newer sources), I am going to hack the ROM image directly. Load up the ROM image (which should be a pure image, not a compressed one) and switch to disassembly mode. Search for “ Above, you should see three bits of code that MOV a value into R14, TEQ R0 with R14, and then BEQ (if a match). The values of the comparisons placed in R14 are #&01EC, #&01CC, and #&01FC – which correspond to ^F12, F12, and Sh^F12. Change the #&01CC one to be #&01DC. Save, then reboot with updated ROM image. And for the single tasking command line, it should now be the cat-proof Shift-F12 keypress. ;-) |
David Feugey (2125) 2709 posts |
I remember vaguely of a tool that ‘press’ return when in cli mode. |
Rick Murray (539) 13840 posts |
My other server will try that if the helper task fails to start. It’ll see if the machine is ‘in the desktop’ and if it isn’t, it’ll “press Return”. But… that port is not exposed on the NAT so that server is only visible locally.
Or just hack the Switcher module so that the command line is now always Shift-F12 and won’t change depending upon what other things may or may not be loaded. |
Gerald Holdsworth (2084) 81 posts |
Or you could just unplug the keyboard… |
Steve Pampling (1551) 8170 posts |
Hmmm, half the keyboard shortcuts I know for Firefox come from Moet(RIP) walking on the keyboard and me seeing it and figuring which paws hit what. Filer/Switcher alteration – it probably needs to include a mod to the switcher menu to list the Shift-F12 option and actually call from there. Edit: I’ve few more I’ve been working on intermittently. |
Martin Avison (27) 1494 posts |
Could not agree more. I very rarely want a command screen, I normally want a command window. I use a module called Ctrlf12 v1.00 (27 Jul 2004) – only 204 bytes – which simply makes f12 open a command window, & ctrl-f12 open a single-tasking command line. Works a treat. But I am not sure where I got it from, and there is no indication who wrote it, but I will have a look in my archives. |
Martin Avison (27) 1494 posts |
|
David Feugey (2125) 2709 posts |
I did not find the module I used, but it was the solution to two problems. |
Kevin (224) 322 posts |
You could make a little box to fit over the F12 key, so it cannot be pressed by mistake. |
John Williams (567) 768 posts |
I remember making a weighted strip of perspex to do the opposite with the BBC B. To do lots of repeated characters with minimum effort – can’t remember why! Did we have a Shift Lock, and could it have been to do lots of solid lines with the underscore? If so it was for manuscript paper to print out on the dot matrix printer! Anyway – another mechanical solution to a problem! |
John Williams (567) 768 posts |
Thank you, Martin – a useful addition! |
Kevin (224) 322 posts |
I got the idea from a friend who had an A5000, the floppy eject button was near the on off switch, which he kept pressing by mistake when ejecting a floppy disc. So he cut an old bank card and taped it over the on off switch. |
Rick Murray (539) 13840 posts |
The last time I needed to do that, I carefully placed a roll of toilet paper on the keyboard. In the tube in the middle, an AA cell resting on the key, then a D cell on top of that. Instant never-ending keypresses. And being cool, RISC OS coped. Unlike the PC that would accept keys faster than the system could cope with so it’d start beeping erratically after about 20-30 seconds. |