int num = event.getKeyCode() - '1' + 1;
if (num >= 1 && num <= 6) {
if (num == 5) {
final String listStyle;
Line l = Paragraph.getFirstLine(mapper(), mapper().getLocation(start));
if (Paragraph.LIST_TYPE.equals(l.getAttribute(Paragraph.SUBTYPE_ATTR)) &&
!Paragraph.LIST_STYLE_DECIMAL.equals(l.getAttribute(Paragraph.LIST_STYLE_ATTR))) {
listStyle = Paragraph.LIST_STYLE_DECIMAL;
} else {
listStyle = null; // default style
}
Paragraph.apply(mapper(), startLoc, endLoc, Paragraph.listStyle(listStyle), true);