RISC/6000:KEYCODE DIFFERENCES BETWEEN AIX 3.2.3 AND AIX 3.1.7.

ITEM: RTA000030375



                                                                                
                                                                                
                                                                                
QUESTION:                                                                       
  My customer has asked me this:                                                
                                                                                
AIX 3.2.3 translates keycodes quite differently than AIX 3.1.7.                 
In AIX 3.1.7, the F1 key's keysym was FFBE but in AIX 3.2.3 it's                
1004FF6A.  How can I change the keysym translation                              
(XtTranslateKeycode) to return the same values in AIX 3.2.3 as                  
was returned in AIX 3.1.7?  The solution, hopefully, will work                  
for both so that no #IFDEF would be required.                                   
                                                                                
---------- ---------- ---------- --------- ---------- ----------               
A: The problem you are experiencing is due to a change to the Motif             
keyboard virtual bindings in OSF/Motif version 1.1.                             
                                                                                
I was able to recreate the problem using your supplied test case and            
found it to be working as designed.                                             
                                                                                
I was able to "work around" the problem by adding the following to my           
 .Xdefaults file:                                                               
                                                                                
hewey*defaultVirtualBindings: #override\                                        
osfHelp :       ShiftF1\n\                                                 
osfMenu :       ShiftF4\n\                                                 
osfMenuBar:     ShiftF10                                                   
                                                                               
I also was able to accomplish this by creating the file $HOME/.motifbind        
with the following lines:                                                       
                                                                                
osfHelp         :       ShiftF1                                            
osfMenu         :       ShiftF4                                            
osfMenuBar      :       ShiftF10                                           
                                                                                
Additional information is available in InfoExplorer by searching on             
"virtual bindings".                                                             
                                                                                
---------- ---------- ---------- --------- ---------- ----------                
I have done some experimentation myself and found the mere existence            
of .motifbind (an empty one) causes all Motif key bindings to be                
cancelled, i.e., not remapped but unmapped which is what I would prefer        
for this application ---- expect for the osfMenu operation.                     
                                                                                
The osfMenu continues to work (expect the application key translation is        
back to normal) on F4 and if I remapped it to AltF2 it still               
continues to operate --- not on the Alt F2 but the normal F2.                   
                                                                                
 1. Is it suppose to stop all together when it is unmapped?                     
                                                                                
 2. Is it skipping the check for key state, i.e, F2 vs Alt F2?                  
                                                                                
 3. How can I cause the same effect from the application so that                
    unmapping the Motif keys only applies to this application, not all   l tha  
    that run under the username?  Is it done through XtSetArg and, if so, so,   
    does the code go after the open display but before the create shell  ll    
    functions?                                                                  
                                                                                
 4. What does "Meta" meaning in the context of Virtual Bindings?                
                                                                                
 5. How can I find out more about the .motifbind file - "info" is very          
    scant?                                                                      
                                                                                
---------- ---------- ---------- --------- ---------- ----------                
A: 1. The use of the .motifbind causes the _MOTIF_BINDINGS property to be       
set on the root window.  The Motif Window Manager overwrites this               
this property and will not alter the property if there is no .motifbind         
file or if it's value is NULL.                                                  
                                                                                
2.  I'm not really sure what you mean here.  You might want to make sure       
that if you use a modifier on a key in the translations list that it            
comes before the translation for the key itself.                                
example: Mod5KP_1: string(0x31) \n\                                        
             KP_1: string(¬..146q)                                         
If this isn't the problem please let me know.                                   
                                                                                
3. If you use the example I provided for the .Xdefaults file:                   
hewey*defaultVirtualBindings:\                                                  
osfHelp        :       ShiftF1\n\                                          
osfMenu        :       ShiftF4\n\                                          
osfMenuBar     :       ShiftF10                                            
                                                                                
where hewey is the name of the program; the bindings will only effect the       
hewey application.  They will not effect an application with a different       
name.                                                                           
                                                                                
4. "Meta" on the RISC System/600 is the Alt key.                                
                                                                                
5. There isn't a heck of a lot of information on the .motifbind file.           
Besides searching in InfoExplorer under "virtual binding" I have used           
Volume 6 of the O'Reilly series.  "Motif Programming Manual" by Dan             
Heller, O'Reilly & Associates, Inc. 1991  ISBN 0-937175-70-6.  Check out        
Appendix B and chapter 2.3.6.                                                   
                                                                                
---------- ---------- ---------- --------- ---------- ----------                
                                                                                
This item was created from library item Q624649 1993 CCWHR                      
                                                                               
S e a r c h - k e y w o r d s:                                                  
AIX ALTERNATE CCWHR DIFFERENCES INDEX IX JUN93 KEYCODE LPPS RISC                
RISCO RISCSYSTEM SOFTWARE SUPT 3.1.7 3.2.3 6000                                 
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                               


WWQA: ITEM: RTA000030375 ITEM: RTA000030375
Dated: 07/1998 Category: RISCO
This HTML file was generated 99/06/24~12:43:12
Comments or suggestions? Contact us