// The array with keysToSend is a multidimensional list. To make the algorithm for sending keys
// and key combinations to the browser easier we flatten it first.
for (CharSequence sequence : keysToSend) {
for (int i = 0; i < sequence.length(); ++i) {
builder.add(new KeyEvent(sequence.charAt(i)));
}
}
sendKeys(builder.build());
releaseModifiers();