Re: ctrl k menu
By: Cru Jones to All on Sat Apr 04 2026 11:48 pm
How would one go about user level access for say the default.js command shell menu set when someone presses the CTRL K menu options?
Access on each key would be nice, to limit the access based on the user level, but if its easier to do all of them at once, thats alright too.
Those are global command keys and not tied to any specific command shell. The only way to restrict access to them would be to either:
1. conditionally modify the console.ctrlkey_passthru JS property, turning off (resetting) the appropriate bits for the users that don't have the user level that you require (see
https://www.synchro.net/docs/jsobjs.html for details).
or:
2. install your own control key handlers in SCFG->External Programs->Global Hot Key Events using your own script/scripts that only invoke the JS console.handle_ctrlkey() method if the user meets the minimum security level requirement. Again, see
https://www.synchro.net/docs/jsobjs.html for more details.
Another approach would be to try to find all the places that console.getkey() or console.getstr() are called in the shell and add the K_NOCTRL mode flag, conditionally, for users that don't meet the minimum level required, but that would turn off *all* control keys (including cursor movement keys) and you'd likely not be able to do that for all places where keys/strings are input. So that's not practical.
--
digital man (rob)
Breaking Bad quote #6:
My Name is ASAC Schrader - and you can go fuck yourself. - Hank Schrader
Norco, CA WX: 85.7øF, 15.0% humidity, 0 mph WSW wind, 0.00 inches rain/24hrs --- SBBSecho 3.37-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)