Page 1 of 2

configure keyboard

PostPosted: Fri May 06, 2011 1:14 pm
by Julie
Hi,
I wish to associate a keyboard key to a rexx action.
For example to associate the PF19 key to action 'next msgline locate' I use the following code.
zpf19 = 'locate prev msgline'
'ispexec vput (zpf19) profile'

I would like to know how can I let the user of my program set its own keyboard.

Re: configure keyboard

PostPosted: Fri May 06, 2011 1:34 pm
by BillyBoyo
You've written an application in rexx and you want to give the user an option to set their own keys?

Which part are you stuck with? The bit which provides the option to the user is more complicated than the setting the key bit. Are you going to validate the input? Limit them to certain keys? How do you want them to tell you which key is changing?

Re: configure keyboard

PostPosted: Fri May 06, 2011 1:51 pm
by Julie
Yes I want to give the user an option to set their own keys.
When they call the program the function displays a panel. I'd like to let the user set their own keys in this panel and the configuration will be saved for the next use. I don't validate the input and there is no limitation for keys.

Re: configure keyboard

PostPosted: Fri May 06, 2011 2:08 pm
by prino
I really hope that your application has its own APPLID, otherwise users are going to curse you when their PF keys in another application no longer work!

Re: configure keyboard

PostPosted: Fri May 06, 2011 2:30 pm
by Julie
That's why I want to let them configure their onw keys.
Indeed my program insert message line in user's cobol program and I need they can move from one message line to another using a shortcut keybord. There are two command I want to configure : 'locate prev msgline' and 'locate next msgline'.

Re: configure keyboard

PostPosted: Fri May 06, 2011 2:40 pm
by prino
Just end your routine with:
zcmd = ";&l msgline next"         
"ispexec control nondispl end"   
"ispexec display panel(isr@prim)"

and they can use Enter to get from one message-line to the next.

Re: configure keyboard

PostPosted: Fri May 06, 2011 2:56 pm
by Julie
My question is gonna sound stupid but what the isr@prim panel is?

Re: configure keyboard

PostPosted: Fri May 06, 2011 3:49 pm
by NicC
Look in PDS where the ISPF panels are stored or turn on panel id

Re: configure keyboard

PostPosted: Fri May 06, 2011 7:01 pm
by Pedro
Julie,
You did not describe the entire process, but you should consider:
1. call EDIT service with a customized panel
2. define the panel with a KEYLIST parameter
3. create a keylist with your desired keys

The user can use the KEYS command to modify the keylist with affecting other panels.

Re: configure keyboard

PostPosted: Fri May 06, 2011 7:58 pm
by Julie
Thanks.

I'd like to know how associate the 'CTRL+n' command with the 'locate next msgline' command.
Should I use the vput statement like in
zpf19 = 'locate prev msgline'
'ispexec vput (zpf19) profile'

I just don't know what can substitute zpf19.