hotkeys form Irix to linux??

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

3 posts / 0 new
Last post
hotkeys form Irix to linux??

Submitted by michi on Wed, 05/08/2002 - 13:17. Developers
Hi,

I`m porting an aplication from Sgi Irix to linux, and both uses open motif... but the hotkeys doesn`t work in linux. There is any configuration or any change in the code for use hotkeys??

What can I do??

Thanks u

ICS_support

It`s unclear what you mean by hotkeys or how you are implementing them, but it`s likely that the difference is in the window manager and in the keys that each already grabs. You probably have a conflict in establishing global grabs.

michi

Ok I explain more

I have a program with a motif menu, a example of the code of the menu
static MenuBarStruct editMenu[] = {
{ MB_PUSH, "Undo", MB_NO_STR, MB_NO_STR, MenuCB, (XtPointer) REEL_EDIT_UNDO },
{ MB_PUSH, "Redo", MB_NO_STR, MB_NO_STR, MenuCB, (XtPointer) REEL_EDIT_REDO },
{ MB_SEP },
{ MB_PUSH, "Cut", MB_NO_STR, MB_NO_STR, MenuCB, (XtPointer) REEL_EDIT_CUT },
{ MB_PUSH, "Copy", MB_NO_STR, MB_NO_STR, MenuCB, (XtPointer) REEL_EDIT_COPY },
{ MB_PUSH, "Paste", MB_NO_STR, MB_NO_STR, MenuCB, (XtPointer) REEL_EDIT_PASTE }
{ MB_END }
};

I also have this function to manage the events
void MotifProcessEvent(XEvent *event)
{
// check event
switch (event->type) {

case ConfigureNotify
{

// if (event->xconfigure.window == _topLevel)
ConfigureChange(event->xconfigure.window, event->xconfigure.x, event->xconfigure.y, event->xconfigure.width, event->xconfigure.height);
XtDispatchEvent(event);
}
break;

default
if (event->type == KeyPress)
printf("ProcessEvent - D3 - %d
",event->type);

int ret = XtDispatchEvent(event);

}
break;
}
}

and a Resource File with the the information of the hot keys (and others things) like this

Menu*Edit*Undo.mnemonic U
Menu*Edit*Undo.accelerator Ctrlz
Menu*Edit*Undo.acceleratorText Ctrl-Z
Menu*Edit*Redo.mnemonic R
Menu*Edit*Redo.accelerator Ctrl Shiftz
Menu*Edit*Redo.acceleratorText Ctrl-Shift-Z
Menu*Edit*Cut.mnemonic t
Menu*Edit*Cut.accelerator Ctrlx
Menu*Edit*Cut.acceleratorText Ctrl-X
Menu*Edit*Copy.mnemonic C
Menu*Edit*Copy.accelerator Ctrlc
Menu*Edit*Copy.acceleratorText Ctrl-C
Menu*Edit*Paste.mnemonic P
Menu*Edit*Paste.accelerator Ctrlv
Menu*Edit*Paste.acceleratorText Ctrl-V

I use all of these in the same aplication in Irix plataform and it works. In linux the acceleratorText appears in the menu (so the Resource File was reading fine, at least these part), in the fuction that processes the event seems that it works and call XtDispatchEvent(event) with a KeyPressed event, but the command dont work. No cut, or paste or anything, dont get into these functions througth the HotKeys (but they works througth the menu).

I not know what could be the problem, can any give any help for where can I have the error??

Very much thanks you for interest for my problem )
and sorry for mt poor english.
See you!