configure keyboard



IBM's Command List programming language & Restructured Extended Executor

configure keyboard

Postby Julie » Fri May 06, 2011 1:14 pm

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.
Julie
 
Posts: 21
Joined: Tue May 03, 2011 12:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: configure keyboard

Postby BillyBoyo » Fri May 06, 2011 1:34 pm

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?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: configure keyboard

Postby Julie » Fri May 06, 2011 1:51 pm

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.
Julie
 
Posts: 21
Joined: Tue May 03, 2011 12:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: configure keyboard

Postby prino » Fri May 06, 2011 2:08 pm

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!
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: configure keyboard

Postby Julie » Fri May 06, 2011 2:30 pm

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'.
Julie
 
Posts: 21
Joined: Tue May 03, 2011 12:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: configure keyboard

Postby prino » Fri May 06, 2011 2:40 pm

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.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: configure keyboard

Postby Julie » Fri May 06, 2011 2:56 pm

My question is gonna sound stupid but what the isr@prim panel is?
Julie
 
Posts: 21
Joined: Tue May 03, 2011 12:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: configure keyboard

Postby NicC » Fri May 06, 2011 3:49 pm

Look in PDS where the ISPF panels are stored or turn on panel id
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: configure keyboard

Postby Pedro » Fri May 06, 2011 7:01 pm

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.
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: configure keyboard

Postby Julie » Fri May 06, 2011 7:58 pm

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.
Julie
 
Posts: 21
Joined: Tue May 03, 2011 12:45 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to CLIST & REXX