CG3264MMJTTSCJWUA2EMTBOPTDB2NZIJ7XICKHWUTZ4UWLFP7POAC G6OYAYHUSMSPKLRW52LQDAF4NBHFPWY3GZAHZZDLJY2ZL6NLTNEQC XNFTJHC4QSHNSIWNN7K6QZEZ37GTQYKHS4EPNSVPQCUSWREROGIQC BULPIBEGL7TMK6CVIE7IS7WGAHGOSUJBGJSFQK542MOWGHP2ADQQC KECEMMMRW2VVBZ567HJQPGLC57LTSBKWH7UFP32IW43D23X6WTEQC 2HW3HUCGWNPSVN2BRPZIFVBI64CTFEJKETLVDJ4X5X2GUPERXSJQC 2RXZ3PGOTTZ6M4R372JXIKPLBQKPVBMAXNPIEO2HZDN4EMYW4GNAC elseif chord == 'left' thenText.left()elseif chord == 'right' thenText.right()-- left/right by one word-- C- hotkeys reserved for drawings, so we'll use M-elseif chord == 'M-left' thenwhile true doText.left()if Cursor1.pos == 1 then break endassert(Cursor1.pos > 1)local offset = utf8.offset(Lines[Cursor1.line].data, Cursor1.pos)assert(offset > 1)if Lines[Cursor1.line].data:sub(offset-1,offset-1) == ' ' thenbreakendendelseif chord == 'M-right' thenwhile true doText.right()if Cursor1.pos > utf8.len(Lines[Cursor1.line].data) then break endlocal offset = utf8.offset(Lines[Cursor1.line].data, Cursor1.pos)if Lines[Cursor1.line].data:sub(offset,offset) == ' ' thenbreakendend-- pasteelseif chord == 'M-v' thenlocal s = love.system.getClipboardText()for _,code in utf8.codes(s) doText.insert_at_cursor(utf8.char(code))endelseif chord == 'home' thenCursor1.pos = 1elseif chord == 'end' thenCursor1.pos = utf8.len(Lines[Cursor1.line].data) + 1
-- pasteelseif chord == 'M-v' thenlocal s = love.system.getClipboardText()for _,code in utf8.codes(s) doText.insert_at_cursor(utf8.char(code))end--== shortcuts that move the cursorelseif chord == 'left' thenText.left()elseif chord == 'right' thenText.right()-- left/right by one word-- C- hotkeys reserved for drawings, so we'll use M-elseif chord == 'M-left' thenwhile true doText.left()if Cursor1.pos == 1 then break endassert(Cursor1.pos > 1)local offset = utf8.offset(Lines[Cursor1.line].data, Cursor1.pos)assert(offset > 1)if Lines[Cursor1.line].data:sub(offset-1,offset-1) == ' ' thenbreakendendelseif chord == 'M-right' thenwhile true doText.right()if Cursor1.pos > utf8.len(Lines[Cursor1.line].data) then break endlocal offset = utf8.offset(Lines[Cursor1.line].data, Cursor1.pos)if Lines[Cursor1.line].data:sub(offset,offset) == ' ' thenbreakendendelseif chord == 'home' thenCursor1.pos = 1elseif chord == 'end' thenCursor1.pos = utf8.len(Lines[Cursor1.line].data) + 1