Sort lines by key more effectively

Also make new lines appear after the last of originally selected lines.
Fix dialog accel char for 'Shadow'