XDEVICEBELL(3)
๐ XDEVICEBELL ๐
okay bestie, welcome to XDeviceBell(3) โ the input-extension girly whose whole entire job is making a device go ding. it's part of the XInput crew, and fr fr she's the one you call when you want a bell rung on a device that's living that input-extension life. let's get into it ๐
โจ NAME โจ
XDeviceBell โ ring a bell on a device supported through the input extension ๐
like. that's it. that's the whole vibe. she rings bells. on devices. through the input extension. iconic behavior honestly.
๐ธ SYNOPSIS ๐ธ
#include <X11/extensions/XInput.h>
Status XDeviceBell( Display *display,
XDevice *device,
XID feedbackclass,
XID feedbackid,
int percent);
and here's the tea on every single argument, no skips, no shortcuts:
displayโ the connection to the X server. your whole little link to the server, she needs it.deviceโ the device that the bell is associated with. yes, THAT device.feedbackclassโ the class of the feedback that the bell is associated with.feedbackidโ the id of the feedback that the bell is associated with.percentโ the volume, in the range-100to100, at which the bell should be rung. yes, negative is allowed, we love a range ๐
๐ฆ DESCRIPTION ๐ฆ
so like, the XDeviceBell request causes the server to ring a bell on the specified feedback of the specified device, if possible. that "if possible" is doing a LOT of heavy lifting, bestie, respect it.
the specified volume is relative to the base volume for the bell. okay so important: relative, not absolute. she's not setting the volume, she's doing math ON the volume. very main character of her.
if an invalid device is specified, a BadDevice error will be returned. ๐
the feedbackclass and feedbackid parameters contain values returned by an XGetFeedbackControl request, and they uniquely identify the bell to ring. so like, you get those values from XGetFeedbackControl, you don't just make them up. no cap.
and here's where it gets spicy: if a feedbackclass is specified that does not support a bell, or if a nonexistent feedbackid is specified, or a percent value is specified that is not in the range -100 to 100 โ you get a BadValue error. three strikes, one error, that's the rule ๐ซถ
๐งฎ the volume math (yes there's math, stay with me)
the volume at which the bell is rung when the percent argument is nonnegative is:
base - [(base * percent) / 100] + percent
the volume at which the bell rings when the percent argument is negative is:
base + [(base * percent) / 100]
see? two formulas, one for nonnegative, one for negative. they're different. don't mix them up. that would be a whole mess. ๐ญ
๐๏ธ changing the base volume
to change the base volume of the bell, use XChangeFeedbackControl. that's the one that actually moves the base, XDeviceBell just plays relative to it. iykyk.
โญ and just so you're not surprised later:XDeviceBellcan generate aBadDeviceor aBadValueerror. those are the only two. she keeps it cute and contained.
๐ DIAGNOSTICS ๐
BadDeviceโ an invalid device was specified. the specified device does not exist, or has not been opened by this client viaXOpenInputDevice. so either she's not real, or you never opened her. either way, no bell for you bestie ๐ญBadValueโ an invalidfeedbackclass,feedbackid, orpercentvalue was specified. one of the three was off. check all three, don't assume. periodt.
๐ SEE ALSO ๐
go read those too, they're the friends in the group chat who fill in the blanks ๐
and that's the whole page, bestie!! ๐โจ
this little love letter comes to you from the XDEVICEBELL(3) manual, dated 05/18/2026. mwah ๐
๐๐ฆ
๐ฆ where this page comes from
- fedora 44: libXi-devel 1.8.3-1.fc44 ยท MIT-open-group AND SMLNJ AND MIT
- fedora 44: libXi-devel 1.8.3-1.fc44 ยท MIT-open-group AND SMLNJ AND MIT
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms