kbedit icon indicating copy to clipboard operation
kbedit copied to clipboard

Intelligent key positioning for staggered rows

Open Daniel-Beardsmore opened this issue 11 years ago • 2 comments

Currently, all new keys are snapped to the major (1u) grid. Support for stagger is poor, as you can't ever insert keys in their correction locations on most rows.

Worse, the program allows for a key to be inserted directly on top of another key, so that the first key vanishes.

One way to work around this is to detect overlap and insert the new key directly to its right. That way, all you need to do for a whole row of keys that are offset by stagger, is draw the large key (e.g. ctrl/caps lock), point at it, and press 1 repeatedly: all the remaining keys will be added to the next available space to the right of the key under the mouse cursor.

Daniel-Beardsmore avatar Nov 28 '14 21:11 Daniel-Beardsmore

this is planned. I believe I will add the key to the right and then to the bottom (if there's no more room).

I tried to remove the grid/snap, but it becomes a pain to align keys.

cubiq avatar Nov 28 '14 23:11 cubiq

Almost works. Steps to reproduce the edge case:

  1. Press 1 to create a key
  2. Move the key so that it is half-way between two major grid squares (x+0.5 u)
  3. Position the cursor over the right-hand side of the key and press 1: behaves as expected
  4. Position the cursor over the left-hand side of the key and press 1: the new key is created in the left-hand major grid square that the key occupies, partially overlapping the key created in step 1

Daniel-Beardsmore avatar Dec 01 '14 20:12 Daniel-Beardsmore