SUpport imac g5 isight ?
  • Paladin of the Pegasos
    Paladin of the Pegasos
    NewSense
    Posts: 1478 from 2012/11/10
    From: Manchester, UK/GB
    @ Georg - I don't think your idea is the way I'd like to see this change - to solve the problem, but thanks for suggesting it anyway. ;-)

    It seems to me that it is either a change to the way the iMac Brightness setting is currently functioning or a change to PageStream that bypasses the iMac Brightness Setting of F1/F2 keys by using alternative Function keys.

    For me, as I am so familiar with using PageStream, and that the iMac Brightness setting is so much more recent I would hope the key allocation in MorphOS could be modified to use a keyboard key modifier, like Control, Alt-Option or Command or use less likely to be used Function Keys like F11 and F12? 8-D
    MacMini 1.5GHz,64MB VRAM, PowerBooks A1138/9 (Model 5,8/9),PowerMac G5 2.3GHz(DP), iMac A1145 2.1GHz 20", all with MorphOS v3.18+,Airport,Bluetooth,A1016 Keyboard,T-RB22 Mouse,DVD-RW-DL,MiniMax,Firewire/USB2 & MacOSX 10.4/5
  • »21.05.23 - 03:31
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Georg
    Posts: 108 from 2004/4/7
    Quote:

    NewSense wrote:
    @ Georg - I don't think your idea is the way I'd like to see this change - to solve the problem, but thanks for suggesting it anyway. ;-)



    Well, then happy wait for months/years for next release which may or may not have the change/option you hope for ...

    Quote:

    I would hope the key allocation in MorphOS could be modified to use a keyboard key modifier, like Control, Alt-Option or Command


    ... instead of using a little hack/tool which (if it works) (and in the meantime) would do the same right now.
  • »21.05.23 - 06:53
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    NewSense
    Posts: 1478 from 2012/11/10
    From: Manchester, UK/GB
    Having spoken to cyfm it seems the PageStream Function key mapping can be modified using the Script Palette so that a modifying "Special" key (such as Control, or several other key combination(s)) can be added so they do not clash-conflict with the iMac F1/F2 key(s) to set the Brightness level. 8-)

    Hopefully this is an interim solution, as I would prefer to have the original PageStream single 'F' key as usual, rather than a 2 key pressed option, but it does at least free the clash-conflict for the time-being that occurred when I installed MorphOS v3.18. 8-D
    MacMini 1.5GHz,64MB VRAM, PowerBooks A1138/9 (Model 5,8/9),PowerMac G5 2.3GHz(DP), iMac A1145 2.1GHz 20", all with MorphOS v3.18+,Airport,Bluetooth,A1016 Keyboard,T-RB22 Mouse,DVD-RW-DL,MiniMax,Firewire/USB2 & MacOSX 10.4/5
  • »22.05.23 - 07:33
    Profile
  • MorphOS Developer
    cyfm
    Posts: 537 from 2003/4/11
    From: Germany
    Quote:

    Georg schrieb:
    Quote:

    NewSense wrote:
    @ Georg - I don't think your idea is the way I'd like to see this change - to solve the problem, but thanks for suggesting it anyway. ;-)



    Well, then happy wait for months/years for next release which may or may not have the change/option you hope for ...

    Quote:

    I would hope the key allocation in MorphOS could be modified to use a keyboard key modifier, like Control, Alt-Option or Command


    ... instead of using a little hack/tool which (if it works) (and in the meantime) would do the same right now.




    Politely ignoring the trolling/rant about a probable delay for a solution due to our update schedules, I will just confirm that this ugly 68K SetFunction() patch won't work anyway as neither the brightness control, nor PageStream5 uses CreateCXObj to install the function key mapping.
  • »22.05.23 - 11:14
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Georg
    Posts: 108 from 2004/4/7
    Quote:

    cyfm wrote:

    I will just confirm that this ugly 68K SetFunction() patch won't work anyway



    Posting source with this gate/trap/whatever stuff (unless beautified by AROS macros)
    would have looked even worse ;-)

    So what about this, then (to have brightness, etc. with ALT + function keys):

    Code:

    #include <exec/interrupts.h>
    #include <devices/input.h>
    #include <devices/inputevent.h>
    #include <proto/exec.h>
    #include <proto/input.h>
    #include <clib/alib_protos.h>

    #define PRI1 121
    #define PRI2 119

    #define NAME1 "FKEYHACK1"
    #define NAME2 "FKEYHACK2"

    #define QUAL IEQUALIFIER_LALT

    #define SHIFTALTCTRL (IEQUALIFIER_LALT | IEQUALIFIER_RALT | IEQUALIFIER_LSHIFT | IEQUALIFIER_RSHIFT | IEQUALIFIER_CONTROL)
    #define IECLASS_HACK 0x7C

    struct MsgPort *mp;
    struct IOStdReq *io;
    struct Interrupt i1, i2;

    struct InputEvent *ihandler1(register struct InputEvent *ie asm("a0"))
    {
    struct InputEvent *e = ie;

    while(e)
    {
    if (e->ie_Class == IECLASS_RAWKEY)
    {
    int code = e->ie_Code &~ IECODE_UP_PREFIX;
    int quali = e->ie_Qualifier & SHIFTALTCTRL;

    if (code >= 0x50 && code <= 0x59) /* F1 .. F10 */
    {
    if (!quali)
    {
    e->ie_Class = IECLASS_HACK;
    }
    else if (quali == QUAL)
    {
    e->ie_Qualifier &= ~QUAL;
    }
    }

    }
    e = e->ie_NextEvent;
    }

    return ie;
    }

    struct InputEvent *ihandler2(register struct InputEvent *ie asm("a0"))
    {
    struct InputEvent *e = ie;

    while(e)
    {
    if (e->ie_Class == IECLASS_HACK)
    {
    e->ie_Class = IECLASS_RAWKEY;
    }
    e = e->ie_NextEvent;
    }

    return ie;
    }


    void dohandler(int cmd, struct Interrupt *i)
    {
    io->io_Command = cmd;
    io->io_Data = i;
    DoIO((struct IORequest *)io);
    }

    int main(void)
    {
    mp = CreateMsgPort();
    io = CreateIORequest(mp, sizeof(*io));

    i1.is_Code = (void *)ihandler1;
    i1.is_Node.ln_Pri = PRI1;
    i1.is_Node.ln_Name = NAME1;

    i2.is_Code = (void *)ihandler2;
    i2.is_Node.ln_Pri = PRI2;
    i2.is_Node.ln_Name = NAME2;

    if (!OpenDevice("input.device", 0, (struct IORequest *)io, 0))
    {
    struct InputEvent *ie;

    dohandler(IND_ADDHANDLER, &i1);
    dohandler(IND_ADDHANDLER, &i2);

    Wait(SIGBREAKF_CTRL_C);

    dohandler(IND_REMHANDLER, &i2);
    dohandler(IND_REMHANDLER, &i1);

    CloseDevice((struct IORequest *)io);
    }

    DeleteIORequest(io);
    DeleteMsgPort(mp);
    }
  • »22.05.23 - 17:29
    Profile
  • Moderator
    Kronos
    Posts: 2243 from 2003/2/24
    That is almost as much code as my abandoned brightness screenbar module.... (works but has no way to save/load a value).
  • »22.05.23 - 18:12
    Profile