Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

LoadWB shortcuts

kas1e
2013-09-27
2014-05-13
  • kas1e
    kas1e
    2013-09-27

    So now when Simon make wb-replacement mode works as expected, we need to deal with LoadWB which handle loading of dopus5/or wb on startup. It done like this:

    -- user rename c:loadwb to c:loadwb_old
    -- user copy and rename dopus5:c/loaddb to c:loadwb

    After that, when you reboot and hold nothing , then dopus5 boots. But if you hold any shift, then real workbench boots.

    And now come some unlogical parts: on amigaos since 1990 holding of shift on boot is being used for disabling wbstartups, as well as holding of ctrl do boot with startup-sequnce.

    Now, if we use original loadwb, then we can't boot normally to whole workbench if we hold shift, because its also disabled all wbtartups. The same for ctrl.

    The loadwb.c is placed now in Source/Misc/C. And relevant part are:

            // See if shift is held down
            if (PeekQualifier()&(IEQUALIFIER_LSHIFT|IEQUALIFIER_RSHIFT))
            {
                // Run Workbench instead
                run_wb=1;
            }
    
            // Is control held down?
            else
            if (PeekQualifier()&IEQUALIFIER_CONTROL)
            {
                // No WBStartup
                wb_startup=0;
            }
    

    What mean, that any hold any shift will run wb , and hold ctrl will runs without wb. I.e. it looks like original authors tries to mimic amigaos and not workbench shortcuts, and so its all was like a mess even back in times.

    Our suggestions now its to change those qualifiers on something not handled via amigaos during boot (r-alt for example for boot in wb, and l-alt to replace ctrl handler). Of course note that all in the Documents/Dopus5_90.pdf text of which i start to cooking.

    Suggestions, etc pretty welcome !

     
  • xenic
    xenic
    2013-09-27

    @kas1e

    -- user rename c:loadwb to c:loadwb_old
    -- user copy and rename dopus5:c/loaddb to c:loadwb

    So what happens if AmiUpdate replaces "loadwb" with a newly released OS4 loadwb or if "dopus5 loadwb" prevents the user from getting the update?? Maybe it would be better to leave system files alone (i.e. leave loadwb as it is). The dopus5 "loaddb" expects Dopus5: assignment in order to find DirectoryOpus and run it. So maybe we instruct the user to do this:

    Copy Dopus5/C/loaddb to the system C: directory.
    Add 2 lines to user-startup:
    
    Assign dopus5: Work:dopus5 (or wherever they install DirectoryOpus)
    Alias loadwb  loaddb
    

    Of course we would need to change references to "loadwb_old" in dopus5 loadwb.c sources to "loadwb" for the above to work. It also depends on on startup-sequence having LoadWB command and not something like C:LoadWB.

    Another alternative would be to just change "LoadWB" in startup-sequence to "loaddb". I think either method is better than changing system files. Of course any new methods may require changes to dopus5 loadwb.c sources.

    As far as which keys to use instead of shift & ctrl, I don't care but we need to make sure we don't use keys that are already used by the system for some other purpose.

     
    Last edit: xenic 2013-09-27
  • kas1e
    kas1e
    2013-09-28

    @xenic
    both ways you desribe are good, but second one imho better. because imho with alias we have chance to overwrite original as well ? anyway i think about that in end:

    -- alt instead of shift
    -- loaddb as it was, just change ref to loadwb_old on loadwb
    -- instruct users about assign to dopus5: and running that loaddb instead of loadwb.

    what you think ? we also need to check all arguments loadwb can handle (there few present), so we will fully understand the context.

     
  • xenic
    xenic
    2013-09-28

    @kas1e
    It doesn't matter to me which way loaddb is started as long as we don't rename loadwb. Editing the startup-sequence to comment out "LoadWB" (;LoadWB) and adding "loaddb" is probably easier for the user.

    The arguments that LoadWB can handle are easily determined by entering "LoadWB ?" in a shell. The acceptable arguments might be different on classic Amiga, Morphos, OS4, & AROS.

    If "alt" works I see no reason not to use it.

     
  • kas1e
    kas1e
    2014-05-13

    @All
    I do not know how it on aros, morphos (and was it like this on os3 or not), but: on os4, holding SHIFT or ALT when LoadWB loads, will disable wbstartup things (and old wbstartup, and new way of prefs:wbstartup). I ask Simon some time ago about, he says that it was like this in amigaos since begining, and stay like this still.

    So, problem now, is when we in Workbench replacement mode, and we after reboot want to load original workbench, and we hold for that SHIFT, then, workbench loads, but without additional startup things (such as amidocks, commodities, etc). The same happens if i do handle ALT in loaddb.c of course. So question is: what we can to do ? Should we choice some other key ? And if so, should we change it for all platforms , or only for aos4 ? And what one we can choice ? Ctrl , Shift and Alt are no-go. Shift and Alt disable wbstartups, Ctrl is used to avoid loading of anything and give pure cli window.

     
  • kas1e
    kas1e
    2014-05-13

    @All

    In general, i think the good way will be add new argument to LoadWB where user can setup by which key he want load workbench instead of dopus. Something like WBKEY/S. So by default all will be as before, but if WBKEY is specified, then it will be used instead of default SHIFT.

    From s-s it will looks like this then: dopus5:c/loaddb WBKEY="key".

    What you think ?

     
  • kas1e
    kas1e
    2014-05-13

    @All

    Or, there is another suggestion : swap shifts on "amiga" keys. I.e. instead of :

    if (PeekQualifier()&(IEQUALIFIER_LSHIFT|IEQUALIFIER_RSHIFT))
    

    just:

    if (PeekQualifier()&(IEQUALIFIER_LCOMMAND|IEQUALIFIER_RCOMMAND))
    

    Then by holding any "amiga" (or "windows" key on pc keyboards) key, user will loads to workbench without problems and without skiping of wbstartup things.

    Also, if user want old-react (i.e. loading workbench without startup stuff), then he always can use shift+amiga combo.

    For me that way look as best one imho. Any objections ? We of course will note in some dopus5.xx.pdf that change.

     
    Last edit: kas1e 2014-05-13
  • xenic
    xenic
    2014-05-13

    @kas1e
    I think it's minor issue. People who use Dopus5 as a Workbench replacement are unlikely to want to switch to Workbench at a reboot. You can change the keys however you want as far as I'm concerned. Just make sure you test the change for other conlicts before committing.