Your company here — click to reach over 10,000 unique daily visitors

XkbDeviceBell - Man Page

Rings the bell on an X input extension device or the default keyboard


Bool XkbDeviceBell (Display *display, Window window, unsigned int device_spec, unsigned int bell_class, unsigned int bell_id, int percent, Atom name);



connection to the X server


window for which the bell is generated, or None


device ID, or XkbUseCoreKbd


X input extension bell class of the bell to be rung


X input extension bell ID of the bell to be rung


bell volume, from -100 to 100 inclusive


a name for the bell, or NULL


The core X protocol allows only applications to explicitly sound the system bell with a  given duration, pitch, and volume. Xkb extends this capability by allowing clients to  attach symbolic names to bells, disable audible bells, and receive an event whenever the  keyboard bell is rung. For the purposes of this document, the audible bell is defined to be the system bell, or the default keyboard bell, as opposed to any  other audible sound generated elsewhere in the system.  You can ask to receive XkbBellNotify events when any client rings any one of the  following:


Xkb generates XkbBellNotify events for all bells except for those resulting from calls to XkbForceDeviceBell and XkbForceBell. To receive XkbBellNotify events under all possible conditions, pass XkbBellNotifyMask in  both the bits_to_change and values_for_bits parameters to XkbSelectEvents.

The XkbBellNotify event has no event details. It is either selected or it is not.  However, you can call XkbSelectEventDetails using XkbBellNotify as the event_type and specifying XkbAllBellEventsMask in bits_to_change and values_for_bits. This has the same effect as a call to XkbSelectEvents.

The structure for the XkbBellNotify event type contains:

   typedef struct _XkbBellNotify {
       int            type;        /* Xkb extension base event code */
       unsigned long  serial;      /* X server serial number for event */
       Bool           send_event;  /* True => synthetically generated */
       Display *      display;     /* server connection where event generated */
       Time           time;        /* server time when event generated */
       int            xkb_type;    /* XkbBellNotify */
       unsigned int   device;      /* Xkb device ID, will not be XkbUseCoreKbd */
       int            percent;     /* requested volume as % of max */
       int            pitch;       /* requested pitch in Hz */
       int            duration;    /* requested duration in microseconds */
       unsigned int   bell_class;  /* X input extension feedback class */
       unsigned int   bell_id;     /* X input extension feedback ID */
       Atom           name;        /* "name" of requested bell */
       Window         window;      /* window associated with event */
       Bool           event_only;  /* False -> the server did not produce a beep */
   } XkbBellNotifyEvent;

If your application needs to generate visual bell feedback on the screen when it receives  a bell event, use the window ID in the XkbBellNotifyEvent, if present.

See Also

XBell(3), XkbBellNotify(3), XkbChangeEnabledControls(3), XkbDeviceBell(3), XkbForceBell(3), XkbForceDeviceBell(3), XGetFeedbackControl(3), XkbSelectEvents(3)

Referenced By

XChangeKeyboardControl(3), XkbBell(3), XkbDeviceBellEvent(3), XkbForceDeviceBell(3).

libX11 1.8.9 X Version 11 XKB FUNCTIONS