@liudr, Where did capacitive sensors come into play? I don't see any mention of that.
I'm treating the request as the library driving 1 of 10 columns low, and reading the rows to see if any pin was pulled low by a button being closed.
Then back high and the next column low and the rows scanned, etc.