inputanalog_query(3)
๐ inputanalog_query(3) โ the Arcan Lua API page, bestie edition ๐
okay so real talk, this is a page from the Arcan Lua API and it's about inputanalog_query โ asking your analog devices what their filtering situation looks like ๐
โจ NAME โจ
inputanalog_query โ Query analog devices for filtering details ๐๐ฎ
๐ซถ SYNOPSIS ๐ซถ
analogtbl_tbl or analogtbl
inputanalog_query( devnum, axnum, rescan )
๐ธ DESCRIPTION ๐ธ
So this function lets you query a device for analog device options and current values ๐ โ and you've got two whole modes, icons only:
- globally โ call it with no arguments and you get a table of
analogtblback ๐ - from a specific device โ pass
devnum, and optionally an axis too
and here's the little extra: if rescan is set to != 0, the input subsystem will first scan for new devices โจ lowkey a whole refresh moment.
๐ NOTES ๐
rescanis a rather costly operation and may possibly lose data for devices that doesn't identify properly ๐ญ so likeโฆ be careful, no cap.analogtblmembers, and yes we're going through every single one because they all matter ๐ซถ:devid,subidโ device and axis indicesupper_bound,lower_boundโ a value>upper and<lower will be discardeddeadzoneโ abs(value) within deadzone will be discardedkernel_sizeโ number of samples in for every sample outmode(drop)โ analog processing disabledmode(pass)โ emit every samplemode(avg)โ average thekernel_sizebuffermode(latest)โ only emit when buffer full, and keep only most recent value
๐ EXAMPLE ๐
function inputanalog_query0()
local antbl = inputanalog_query();
print(#antbl, "devices found.");
for i = 1, #antbl do
print("-----0);
print(string.format("%d:%d, upper:%d, lower: %d, deadzone: %d, " ..
"kernel_size: %d, filter_mode: %s0, antbl[i].devid, antbl[i].subid,
antbl[i].upper_bound, antbl[i].lower_bound, antbl[i].deadzone,
antbl[i].kernel_size, antbl[i].mode));
print("-----0);
end
end
look at her go, looping through every device and printing the whole filter resume ๐โจ iconic.
๐ MISUSE ๐
function inputanalog_query0()
inputanalog_query("ind");
end
yeahโฆ that's the "don't do this" exhibit, bestie ๐ noted and filed under not it.
๐ฆ SEE ALSO ๐ฆ
iodev
and that's the whole page, fr fr ๐ this one was written down in October 2026, living in inputanalog_query(3) โ go forth and query those analog devices, you've got this ๐๐ธ
๐ฆ where this page comes from
- nixos 26.05: arcan 0.7.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms