[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decwindows

Title:DECWINDOWS
Notice:DECwindows Motif V1.2-4 SSB kits: note 5519
Moderator:GRIM::MESSENGER
Created:Wed Nov 28 1990
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:5861
Total number of notes:24081

5771.0. "Calcomp Drawing Board III Table - Can buttons be Remapped ?" by PEACHS::PEACHS::BECHTOLD () Wed Feb 05 1997 22:45

    Customer has a question on customizing the Calcomp Drawing Board III
    Tablet. they are using it on an AlphaStation running OpenVMS V6.2 and
    have the AXPTAB01_062 kit installed. All is working well.
    
    The customer would like to re-arrange the Puck buttons.
    
    Per customer...
    
    "We have been purchasing Calcomp Drawing Board III graphic tablets through
    Digital for our AlphaStations.  The only way Digital sells them is with
    a 16 buttom cordless puck ("cursor").  Our users would like to change the
    primary buttons from 0 and 1 to  0 and 3.  I looked through all my
    documentation and cannot find our how to do this.  Can you help ?"
    
    
    So, the question is...
    
    - Can the Puck buttons be re-mapped ?
    
    Maybe xset will do this ?
    
    Any help is appreciated.
    
    Regards,
    Dave Bechtold
    DTN 343-1216
T.RTitleUserPersonal
Name
DateLines
5771.1xmodmap.exeZUR01::JAUNINwww2000: click and dispairThu Feb 06 1997 05:3075
The Procedure below is needed to redefine the mouse buttons. You need 
the file DECW$UTILS:XMODMAP.EXE on your system.

The file DECW$TABLET_XMODMAP.COM can be placed at SYS$STARTUP where
the Tablet Startup is.

Hope this helps:
andre

----------------------------------------------------------------------
$ !  DECW$TABLET_XMODMAP.COM
$ !
$ !  Created by Andre Jaunin DIGITAL EQUIPMENT CORP. AG SWITZERLAND
$ !
$ !  This Procedure redefines mouse buttons or the buttons for a 16
$ !  button mouse or a pen used with the tablet DRAWINGBOARD III
$ !
$ !  The Problem is that the Tablet Startup defines a 16-button mouse
$ !  and if you like to change the order you have to define all the 
$ !  16 buttons.
$ !
$ !  BUT:      If a user logs out, the server reset will set the Xserver
$ !            back to a 3-button mouse and a modmap with a 16-button
$ !            definition is no longer possible.
$ !
$ !  SOLUTION: We DON'T start the tablet in DECW$PRIVAT_SERVER_SETUP.COM.
$ !            We start it in DECW$SYLOGIN.COM. This makes shure that if
$ !            the user logs out and back in again, the tablet will be
$ !            configured again and set back to 16-button mouse.
$ !        
$ !            At the DECW$SYLOGIN.COM we also start this procedure to 
$ !            change the mouse buttons. If we don't want to change the
$ !            buttons for each user, we can start this procedure in 
$ !            the user specific DECW$LOGIN.COM.
$ !
$ !            DECW$SYLOGIN.COM and DECW$LOGIN.COM are executed when
$ !            ever a user logs in to the DECwindows Motif environment.
$ !
$ !            Before we do the XMODMAP we have to verify that the tablet
$ !            process is running. Therefor we loop until the DECW$TABLET
$ !            process is running and then we wait for another 10 seconds
$ !            until the tablet is configured and them we do:
$ !
$ !             $modmap=="$decw$utils:xmodmap.exe"
$ !             $modmap -e "pointer = 2 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16"
$ !
$ !--------------------------------------------------------------------------  
$
$ !  First, we loop until the DECW$TABLET process is up and running.
$ !
$
$ server_number = 0
$ tablet_name = "DECW$TABLET_''server_number'"
$ server_name = "DECW$SERVER_''server_number'"
$
$   context = ""
$ tablet_loop:
$   pid = F$PID(context)
$   if F$GETJPI(pid,"PRCNAM") .nes. tablet_name then goto tablet_loop
$   if F$GETJPI(pid,"PRCNAM") .eqs. tablet_name then goto tablet_found
$
$ !
$ !  The Tablet process is running so we can change the mouse buttons.
$ !  Before, we wait another 10 seconds until the tablet gets initialized.
$
$ tablet_found:
$
$    wait 00:00:10.0
$
$    modmap=="$decw$utils:xmodmap.exe"
$    modmap -e "pointer = 2 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16"
$
$ exit
--------------------------------------------------------------------------

5771.2problems with unpriv users...ZUR01::JAUNINwww2000: click and dispairThu Feb 06 1997 05:5139
The Tablet startup defines a 16-button mouse and if you log out the
"server reset" sets the Xserver back to a 3-button mouse.

So that means if you are using a 16button puck with the tablet or you 
are redefining buttons you can not start the Tablet in private server 
setup as described in the installation guide.

To avoid this, you have to start the Tablet in DECW$SYLOGIN.COM or
DECW$LOGIN.COM (user specific). Then the Tablet will be started or
restarted every time the user logs into the DECwindows Motif
environment.

But now you have the problem that unprivileged users are not able to 
do so. Edwin Gersbach found a good way to implement a solution for 
unprivileged users:

1. Create a batch queue with world delete access or set this on sys$batch
2. Create a commandfile with the following contents:
     $ @SYS$STARTUP:DECW$TABLET_STARTUP
     $ SUBMIT/HOLD/QUEUE=SYS$BATCH/NOPRINT DISK:[DIRECTORY]BATCH.COM
     $ DEFINE/SYSTEM DECW$RESTART_TABLET_ENTRY '$ENTRY'
     $ EXIT
3. call this commandfile from systartup instead of DECW$TABLET_STARTUP
4. in the users login replace the execution of DECW$TABLET_STARTUP with the
   command:
     $ SET ENTRY/RELEASE 'F$TRNLNM("DECW$RESTART_TABLET_ENTRY")

Works great except for one thing: When the system gets rebooted, a new
entry is created in the queue while the old entry is still there.

Possible workaround:
In the site specific shutdown procedure do the following:

   Restarting the queue manager and queue (because the queue manager is
   already stopped at that time), deleting the entry and stopping
   the queues again.

hope this helps.
andre