Ok,i added the "step 1" you mentioned (actually, it's pretty fun! Not sure if it's that useful, though). -jgpaiva
Thank you so much for such a responsive attitude! It works exactly as expected. I find it pretty useful, especially since consecutive zone numbers match zones that are actually close one to the other in my grids.
Congratualtions on implementing detection of which grid element the active window is. This works perfectly!
Regarding the step2, it'd have to be made in the following way: each grid element would say what was the grid on its right, the grid on its left and the grid on its top and bottom. I think it'd be quite a chore to implement and then to create grids with these features, though.
-jgpaiva
That is pretty straight forward, the user just has to define 2 strings per grid as explained in my previous post:
horizontal arrows: (1,2,4,5,6,3)
This means that the user considers zone2 to have zone4 on its right and zone1 on its left
vertical arrows: (1,4,6,3,2,5)
This means that the user considers zone2 to have zone3 below and zone5 below
For example, for a 4 part grid, you'd have horizontal arrows = (1,2,3,4) and vertical arrows = (1,3,2,4). Believe me, defining this for the user is not a chore, it is just a small string.
On the program side, you just have to parse this simple string or dump it to an array, and assign the new zone to:
- the previous element of "horizontal arrows" in case the left key was pressed
- the next element of "horizontal arrows" in case the right key was pressed
- the first element of "horizontal arrows" in case the "Home" key was pressed
- the last element of "horizontal arrows" in case the "End" key was pressed
- the previous element of "vertical arrows" in case the down key was pressed
- the next element of "vertical arrows" in case the up key was pressed
- the first element of "vertical arrows" in case the "Page Down" key was pressed
- the last element of "vertical arrows" in case the "Page Up" key was pressed
At least for the simple grids, arrow navigation should feel pretty natural.