Functions

MRightDown

Determine the status of the right mouse button

Syntax

Signature
xBool MRightDown( void );

Arguments

No arguments.

Return value

T if the right mouse button is down, otherwise F.

Description

Poll the current state of the right mouse button. Use it to tell whether the button is still held after opening a context menu. For individual press or release events, select the right-button masks in `Inkey()`.

Example

mrightdown.c
#include "xdev-wtui.h"

#include <stdio.h>

int main( void )
{
   if( !MPresent() )
   {
      puts( "Mouse unavailable." );
      return 0;
   }

   DispOut( "Hold down the right mouse button.", NULL );
   Inkey( 3, NIL );
   printf( "Right button down: %s\n", MRightDown() ? "yes" : "no" );

   return 0;
}