Anelok: slide to scroll

Werner Almesberger werner at
Sat Jan 3 02:20:55 UTC 2015

The user interface so far only had up / down "buttons" for scrolling
by one entry at a time. It now also supports sliding as a way to
scroll with pixel granularity.

This can be easily experienced with the simulator:

git clone git://
cd anelok/sim
./sim -t

The -t option bypasses the start sequence and jumps right to the list
of accounts. A click (you have to hold the mouse button down for a
brief moment - this is because the simulator sends clicks through
Anelok's regular debouncing functions) in the upper third of the
window will move up by one item. A click in the lower third will move
down by one item.

Now, to slide, move the mouse to a convenient location, click and
hold, shift the mouse in the desired direction, and then release the
button. If you overshoot the target, just slide back without
releasing the button.

You'll notice that you have to slide for some distance before there
is any reaction. This is a threshold to prevent mere changes in
finger pressure to cause a switch to slide mode. (Capacitive sensing
is noisy business.)

For development, it is often desirable to have a bit more precise
control. The following keys provide this (only if the simulator was
started with the -t option):

  + or =	Slide down by one pixel (this bypasses the threshold)
  -		Slide up by one pixel

  T		Jump to the top of the list
  M		Jump to the middle of the list
  B		Jump to the bottom of the list

The way the account selection starts may be a bit unusual: one would
normally expect the cursor to be at the top of the screen, pointing
to the first item. More about this in the next post.

Oh, and nothing beyond the account list is implemented. So if you try
to use an entry, you'll the apologetic ghost.

- Werner

More information about the discussion mailing list