diff --git a/changelog.txt b/changelog.txt index 647ad7f85..0a14d6a6e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -31,8 +31,11 @@ Template for new versions: ## New Features ## Fixes +- `gui/quickfort`: only print a help blueprint's text once even if the repeat setting is enabled ## Misc Improvements +- `control-panel`: Add realistic-melting tweak to control-panel registry +- `idle-crafting`: also support making shell crafts for workshops with linked input stockpiles - `fix/stuck-worship`: reduced console output by default. ``--verbose`` option to print all affected units. ## Removed diff --git a/docs/exterminate.rst b/docs/exterminate.rst index 664019aec..9ce66b979 100644 --- a/docs/exterminate.rst +++ b/docs/exterminate.rst @@ -43,7 +43,7 @@ Options ``-m``, ``--method `` Specifies the "method" of killing units. See below for details. ``-o``, ``--only-visible`` - Specifies the tool should only kill units visible to the player. + Specifies the tool should only kill units visible to the player on the map. ``-f``, ``--include-friendly`` Specifies the tool should also kill units friendly to the player. diff --git a/docs/gui/journal.rst b/docs/gui/journal.rst index d6004ec95..a13bda3e6 100644 --- a/docs/gui/journal.rst +++ b/docs/gui/journal.rst @@ -8,47 +8,68 @@ gui/journal The `gui/journal` interface makes it easy to take notes and document important details for the fortresses. -With this multi-line text editor, -you can keep track of your fortress's background story, goals, notable events, -and both short-term and long-term plans. +With this multi-line text editor, you can keep track of your fortress's +background story, goals, notable events, and both short- and long-term plans. This is particularly useful when you need to take a longer break from the game. -Having detailed notes makes it much easier to resume your game after -a few weeks or months, without losing track of your progress and objectives. +Having detailed notes makes it much easier to resume your game after a few +weeks or months without losing track of your progress and objectives. Supported Features ------------------ -- Cursor Control: Navigate through text using arrow keys (left, right, up, down) for precise cursor placement. -- Fast Rewind: Use :kbd:`Ctrl` + :kbd:`Left` / :kbd:`Ctrl` + :kbd:`B` and :kbd:`Ctrl` + :kbd:`Right` / :kbd:`Ctrl` + :kbd:`F` to move the cursor one word back or forward. -- Longest X Position Memory: The cursor remembers the longest x position when moving up or down, making vertical navigation more intuitive. -- Mouse Control: Use the mouse to position the cursor within the text, providing an alternative to keyboard navigation. -- New Lines: Easily insert new lines using the :kbd:`Enter` key, supporting multiline text input. -- Text Wrapping: Text automatically wraps within the editor, ensuring lines fit within the display without manual adjustments. -- Backspace Support: Use the backspace key to delete characters to the left of the cursor. -- Delete Character: :kbd:`Ctrl` + :kbd:`D` deletes the character under the cursor. -- Line Navigation: :kbd:`Ctrl` + :kbd:`H` (like "Home") moves the cursor to the beginning of the current line, and :kbd:`Ctrl` + :kbd:`E` (like "End") moves it to the end. -- Delete Current Line: :kbd:`Ctrl` + :kbd:`U` deletes the entire current line where the cursor is located. -- Delete Rest of Line: :kbd:`Ctrl` + :kbd:`K` deletes text from the cursor to the end of the line. -- Delete Last Word: :kbd:`Ctrl` + :kbd:`W` removes the word immediately before the cursor. -- Text Selection: Select text with the mouse, with support for replacing or removing selected text. -- Jump to Beginning/End: Quickly move the cursor to the beginning or end of the text using :kbd:`Shift` + :kbd:`Up` and :kbd:`Shift` + :kbd:`Down`. -- Select Word/Line: Use double click to select current word, or triple click to select current line +- Cursor Control: Navigate through text using arrow keys (Left, Right, Up, + and Down) for precise cursor placement. +- Fast Rewind: Use :kbd:`Ctrl` + :kbd:`Left` and :kbd:`Ctrl` + :kbd:`Right` to + move the cursor one word back or forward. +- Longest X Position Memory: The cursor remembers the longest x position when + moving up or down, making vertical navigation more intuitive. +- Mouse Control: Use the mouse to position the cursor within the text, + providing an alternative to keyboard navigation. +- New Lines: Easily insert new lines using the :kbd:`Enter` key, supporting + multiline text input. +- Text Wrapping: Text automatically wraps within the editor, ensuring lines fit + within the display without manual adjustments. +- Backspace Support: Use the backspace key to delete characters to the left of + the cursor. +- Delete Character: :kbd:`Delete` deletes the character under the cursor. +- Line Navigation: :kbd:`Home` moves the cursor to the beginning of the current + line, and :kbd:`End` moves it to the end. +- Delete Current Line: :kbd:`Ctrl` + :kbd:`U` deletes the entire current line + where the cursor is located. +- Delete Rest of Line: :kbd:`Ctrl` + :kbd:`K` deletes text from the cursor to + the end of the line. +- Delete Last Word: :kbd:`Ctrl` + :kbd:`W` removes the word immediately before + the cursor. +- Text Selection: Select text with the mouse, with support for replacing or + removing selected text. +- Jump to Beginning/End: Quickly move the cursor to the beginning or end of the + text using :kbd:`Ctrl` + :kbd:`Home` and :kbd:`Ctrl` + :kbd:`End`. +- Select Word/Line: Use double click to select current word, or triple click to + select current line - Select All: Select entire text by :kbd:`Ctrl` + :kbd:`A` -- Undo/Redo: Undo/Redo changes by :kbd:`Ctrl` + :kbd:`Z` / :kbd:`Ctrl` + :kbd:`Y` -- Clipboard Operations: Perform OS clipboard cut, copy, and paste operations on selected text, allowing you to paste the copied content into other applications. +- Undo/Redo: Undo/Redo changes by :kbd:`Ctrl` + :kbd:`Z` / :kbd:`Ctrl` + + :kbd:`Y` +- Clipboard Operations: Perform OS clipboard cut, copy, and paste operations on + selected text, allowing you to paste the copied content into other + applications. - Copy Text: Use :kbd:`Ctrl` + :kbd:`C` to copy selected text. - - copy selected text, if available - - If no text is selected it copy the entire current line, including the terminating newline if present. + - copy selected text, if available + - If no text is selected it copy the entire current line, including the + terminating newline if present. - Cut Text: Use :kbd:`Ctrl` + :kbd:`X` to cut selected text. - - cut selected text, if available - - If no text is selected it will cut the entire current line, including the terminating newline if present -- Paste Text: Use :kbd:`Ctrl` + :kbd:`V` to paste text from the clipboard into the editor. - - replace selected text, if available - - If no text is selected, paste text in the cursor position + - cut selected text, if available + - If no text is selected it will cut the entire current line, including the + terminating newline if present +- Paste Text: Use :kbd:`Ctrl` + :kbd:`V` to paste text from the clipboard into + the editor. + - replace selected text, if available + - If no text is selected, paste text in the cursor position - Scrolling behaviour for long text build-in -- Table of contents (:kbd:`Ctrl` + :kbd:`O`), with headers line prefixed by '#', e.g. '# Fort history', '## Year 1' -- Table of contents navigation: jump to previous/next section by :kbd:`Ctrl` + :kbd:`Up` / :kbd:`Ctrl` + :kbd:`Down` +- Table of contents (:kbd:`Ctrl` + :kbd:`O`), with headers line prefixed by + ``#``, e.g. ``# Fort history``, ``## Year 1`` +- Table of contents navigation: jump to previous/next section by :kbd:`Ctrl` + + :kbd:`Up` / :kbd:`Ctrl` + :kbd:`Down` Usage ----- diff --git a/docs/idle-crafting.rst b/docs/idle-crafting.rst index 5f99d24df..b0377a6a7 100644 --- a/docs/idle-crafting.rst +++ b/docs/idle-crafting.rst @@ -54,7 +54,7 @@ supported, with stonecrafting being the default option. Thus, to designate a workshop for bone carving, disable the stonecrafting labor while keeping the bone carving labor enabled. -For workshops with input stockpile links, the creation of totems and horn crafts -are supported as well. In this case, the choice of job is made randomly based on -the resources available in the input stockpiles (respecting the permitted -labors from the workshop profile). +For workshops with input stockpile links, the creation of totems, shell crafts, +and horn crafts are supported as well. In this case, the choice of job is made +randomly based on the resources available in the input stockpiles (respecting +the permitted labors from the workshop profile). diff --git a/docs/position.rst b/docs/position.rst index 23a8cfe1e..9d06d3961 100644 --- a/docs/position.rst +++ b/docs/position.rst @@ -3,7 +3,7 @@ position .. dfhack-tool:: :summary: Report cursor and mouse position, along with other info. - :tags: adventure fort inspection map + :tags: adventure dfhack fort inspection map This tool reports the current date, clock time, month, season, and historical era. It also reports the keyboard cursor position (or just the z-level if no diff --git a/idle-crafting.lua b/idle-crafting.lua index fd650c881..f78e66763 100644 --- a/idle-crafting.lua +++ b/idle-crafting.lua @@ -143,6 +143,31 @@ function makeBoneCraft(unit, workshop) return dfhack.job.addWorker(job, unit) end +---make shell crafts at specified workshop +---@param unit df.unit +---@param workshop df.building_workshopst +---@return boolean +function makeShellCraft(unit, workshop) + local job = make_job() + job.job_type = df.job_type.MakeCrafts + job.mat_type = -1 + job.material_category.shell = true + + local jitem = df.job_item:new() + jitem.item_type = df.item_type.NONE + jitem.mat_type = -1 + jitem.mat_index = -1 + jitem.quantity = 1 + jitem.vector_id = df.job_item_vector_id.ANY_REFUSE + jitem.flags1.unrotten = true + jitem.flags2.shell = true + jitem.flags2.body_part = true + job.job_items.elements:insert('#', jitem) + + assignToWorkshop(job, workshop) + return dfhack.job.addWorker(job, unit) +end + ---make rock crafts at specified workshop ---@param unit df.unit ---@param workshop df.building_workshopst @@ -177,6 +202,8 @@ local function categorize_craft(tab,item) tab['skull'] = (tab['skull'] or 0) + 1 elseif item.corpse_flags.horn then tab['horn'] = (tab['horn'] or 0) + item.material_amount.Horn + elseif item.corpse_flags.shell then + tab['shell'] = (tab['shell'] or 0) + 1 end elseif df.item_boulderst:is_instance(item) then tab['boulder'] = (tab['boulder'] or 0) + 1 @@ -310,11 +337,13 @@ function select_crafting_job(workshop) tab['bone'] = nil tab['skull'] = nil tab['horn'] = nil + tab['shell'] = nil end local material = weightedChoice(tab) if material == 'bone' then return makeBoneCraft elseif material == 'skull' then return makeTotem elseif material == 'horn' then return makeHornCrafts + elseif material == 'shell' then return makeShellCraft elseif material == 'boulder' then return makeRockCraft else return nil diff --git a/internal/control-panel/registry.lua b/internal/control-panel/registry.lua index 5f20954cc..4e0bdd2e6 100644 --- a/internal/control-panel/registry.lua +++ b/internal/control-panel/registry.lua @@ -125,6 +125,8 @@ COMMANDS_BY_IDX = { {command='partial-items', help_command='tweak', group='gameplay', mode='tweak', default=true, desc='Displays percentages on partially-consumed items like hospital cloth.'}, {command='pop-control', group='gameplay', mode='enable'}, + {command='realistic-melting', help_command='tweak', group='gameplay', mode='tweak', + desc='Adjust selected item types melt return for all metals to ~95% of forging cost. Reduce melt return by 10% per wear level.'}, {command='starvingdead', group='gameplay', mode='enable'}, {command='timestream', group='gameplay', mode='enable'}, {command='work-now', group='gameplay', mode='enable'}, diff --git a/internal/journal/text_editor.lua b/internal/journal/text_editor.lua index cf15776d4..9815a2f12 100644 --- a/internal/journal/text_editor.lua +++ b/internal/journal/text_editor.lua @@ -761,30 +761,30 @@ function TextEditorView:onCursorInput(keys) self:setCursor(offset) self.last_cursor_x = last_cursor_x return true - elseif keys.KEYBOARD_CURSOR_UP_FAST then + elseif keys.CUSTOM_CTRL_HOME then self:setCursor(1) return true - elseif keys.KEYBOARD_CURSOR_DOWN_FAST then + elseif keys.CUSTOM_CTRL_END then -- go to text end self:setCursor(#self.text + 1) return true - elseif keys.CUSTOM_CTRL_B or keys.A_MOVE_W_DOWN then + elseif keys.CUSTOM_CTRL_LEFT then -- back one word local word_start = self:wordStartOffset() self:setCursor(word_start) return true - elseif keys.CUSTOM_CTRL_F or keys.A_MOVE_E_DOWN then + elseif keys.CUSTOM_CTRL_RIGHT then -- forward one word local word_end = self:wordEndOffset() self:setCursor(word_end) return true - elseif keys.CUSTOM_CTRL_H then + elseif keys.CUSTOM_HOME then -- line start self:setCursor( self:lineStartOffset() ) return true - elseif keys.CUSTOM_CTRL_E then + elseif keys.CUSTOM_END then -- line end self:setCursor( self:lineEndOffset() @@ -878,8 +878,7 @@ function TextEditorView:onTextManipulationInput(keys) self:eraseSelection() return true - elseif keys.CUSTOM_CTRL_D then - -- delete char, there is no support for `Delete` key + elseif keys.CUSTOM_DELETE then self.history:store(HISTORY_ENTRY.DELETE, self.text, self.cursor) if (self:hasSelection()) then diff --git a/internal/quickfort/notes.lua b/internal/quickfort/notes.lua index aa6416860..5667cfb93 100644 --- a/internal/quickfort/notes.lua +++ b/internal/quickfort/notes.lua @@ -31,7 +31,11 @@ function do_run(_, grid, ctx) if #line > 0 then table.insert(lines, table.concat(line, ' ')) end - table.insert(ctx.messages, table.concat(lines, '\n')) + local message = table.concat(lines, '\n') + if not ctx.messages_set[message] then + table.insert(ctx.messages, message) + ctx.messages_set[message] = true + end end function do_orders() diff --git a/modtools/reaction-trigger.lua b/modtools/reaction-trigger.lua index c71e84f37..5514a0151 100644 --- a/modtools/reaction-trigger.lua +++ b/modtools/reaction-trigger.lua @@ -181,7 +181,7 @@ local validArgs = utils.invert({ 'allowMultipleTargets', 'range', 'ignoreWorker', - 'dontSkipInactive', + 'dontSkipInactive', --TODO: positions for inactive units are meaningless! 'resetPolicy' }) diff --git a/test/gui/journal.lua b/test/gui/journal.lua index d845aef20..612e86078 100644 --- a/test/gui/journal.lua +++ b/test/gui/journal.lua @@ -772,7 +772,7 @@ function test.handle_delete() text_area:setCursor(1) journal:onRender() - simulate_input_keys('CUSTOM_CTRL_D') + simulate_input_keys('CUSTOM_DELETE') expect.eq(read_rendered_text(text_area), table.concat({ '_: Lorem ipsum dolor sit amet, consectetur adipiscing elit.', @@ -783,7 +783,7 @@ function test.handle_delete() text_area:setCursor(124) journal:onRender() - simulate_input_keys('CUSTOM_CTRL_D') + simulate_input_keys('CUSTOM_DELETE') expect.eq(read_rendered_text(text_area), table.concat({ '0: Lorem ipsum dolor sit amet, consectetur adipiscing elit.', @@ -794,7 +794,7 @@ function test.handle_delete() text_area:setCursor(123) journal:onRender() - simulate_input_keys('CUSTOM_CTRL_D') + simulate_input_keys('CUSTOM_DELETE') expect.eq(read_rendered_text(text_area), table.concat({ '0: Lorem ipsum dolor sit amet, consectetur adipiscing elit.', @@ -805,7 +805,7 @@ function test.handle_delete() text_area:setCursor(171) journal:onRender() - simulate_input_keys('CUSTOM_CTRL_D') + simulate_input_keys('CUSTOM_DELETE') expect.eq(read_rendered_text(text_area), table.concat({ '0: Lorem ipsum dolor sit amet, consectetur adipiscing elit.', @@ -815,7 +815,7 @@ function test.handle_delete() }, '\n')); for i=1,59 do - simulate_input_keys('CUSTOM_CTRL_D') + simulate_input_keys('CUSTOM_DELETE') end expect.eq(read_rendered_text(text_area), table.concat({ @@ -824,7 +824,7 @@ function test.handle_delete() 'nibhorttitor mi, vitae rutrum eros metus nec libero._', }, '\n')); - simulate_input_keys('CUSTOM_CTRL_D') + simulate_input_keys('CUSTOM_DELETE') expect.eq(read_rendered_text(text_area), table.concat({ '0: Lorem ipsum dolor sit amet, consectetur adipiscing elit.', @@ -849,7 +849,7 @@ function test.line_end() text_area:setCursor(1) journal:onRender() - simulate_input_keys('CUSTOM_CTRL_E') + simulate_input_keys('CUSTOM_END') expect.eq(read_rendered_text(text_area), table.concat({ '60: Lorem ipsum dolor sit amet, consectetur adipiscing elit._', @@ -861,7 +861,7 @@ function test.line_end() text_area:setCursor(70) journal:onRender() - simulate_input_keys('CUSTOM_CTRL_E') + simulate_input_keys('CUSTOM_END') expect.eq(read_rendered_text(text_area), table.concat({ '60: Lorem ipsum dolor sit amet, consectetur adipiscing elit.', @@ -873,7 +873,7 @@ function test.line_end() text_area:setCursor(200) journal:onRender() - simulate_input_keys('CUSTOM_CTRL_E') + simulate_input_keys('CUSTOM_END') expect.eq(read_rendered_text(text_area), table.concat({ '60: Lorem ipsum dolor sit amet, consectetur adipiscing elit.', @@ -882,7 +882,7 @@ function test.line_end() '60: Lorem ipsum dolor sit amet, consectetur adipiscing elit._', }, '\n')); - simulate_input_keys('CUSTOM_CTRL_E') + simulate_input_keys('CUSTOM_END') expect.eq(read_rendered_text(text_area), table.concat({ '60: Lorem ipsum dolor sit amet, consectetur adipiscing elit.', @@ -905,7 +905,7 @@ function test.line_beging() simulate_input_text(text) - simulate_input_keys('CUSTOM_CTRL_H') + simulate_input_keys('CUSTOM_HOME') expect.eq(read_rendered_text(text_area), table.concat({ '60: Lorem ipsum dolor sit amet, consectetur adipiscing elit.', @@ -917,7 +917,7 @@ function test.line_beging() text_area:setCursor(173) journal:onRender() - simulate_input_keys('CUSTOM_CTRL_H') + simulate_input_keys('CUSTOM_HOME') expect.eq(read_rendered_text(text_area), table.concat({ '60: Lorem ipsum dolor sit amet, consectetur adipiscing elit.', @@ -929,7 +929,7 @@ function test.line_beging() text_area:setCursor(1) journal:onRender() - simulate_input_keys('CUSTOM_CTRL_H') + simulate_input_keys('CUSTOM_HOME') expect.eq(read_rendered_text(text_area), table.concat({ '_0: Lorem ipsum dolor sit amet, consectetur adipiscing elit.', @@ -1110,7 +1110,7 @@ function test.jump_to_text_end() text_area:setCursor(1) journal:onRender() - simulate_input_keys('KEYBOARD_CURSOR_DOWN_FAST') + simulate_input_keys('CUSTOM_CTRL_END') expect.eq(read_rendered_text(text_area), table.concat({ '60: Lorem ipsum dolor sit amet, consectetur adipiscing elit.', @@ -1119,7 +1119,7 @@ function test.jump_to_text_end() '60: Lorem ipsum dolor sit amet, consectetur adipiscing elit._', }, '\n')); - simulate_input_keys('KEYBOARD_CURSOR_DOWN_FAST') + simulate_input_keys('CUSTOM_CTRL_END') expect.eq(read_rendered_text(text_area), table.concat({ '60: Lorem ipsum dolor sit amet, consectetur adipiscing elit.', @@ -1142,7 +1142,7 @@ function test.jump_to_text_begin() simulate_input_text(text) - simulate_input_keys('KEYBOARD_CURSOR_UP_FAST') + simulate_input_keys('CUSTOM_CTRL_HOME') expect.eq(read_rendered_text(text_area), table.concat({ '_0: Lorem ipsum dolor sit amet, consectetur adipiscing elit.', @@ -1151,7 +1151,7 @@ function test.jump_to_text_begin() '60: Lorem ipsum dolor sit amet, consectetur adipiscing elit.', }, '\n')); - simulate_input_keys('KEYBOARD_CURSOR_UP_FAST') + simulate_input_keys('CUSTOM_CTRL_HOME') expect.eq(read_rendered_text(text_area), table.concat({ '_0: Lorem ipsum dolor sit amet, consectetur adipiscing elit.', @@ -1355,10 +1355,10 @@ function test.line_navigation_reset_selection() 'porttitor mi, vitae rutrum eros metus nec libero.', }, '\n')); - simulate_input_keys('CUSTOM_CTRL_H') + simulate_input_keys('CUSTOM_HOME') expect.eq(read_selected_text(text_area), '') - simulate_input_keys('CUSTOM_CTRL_E') + simulate_input_keys('CUSTOM_END') expect.eq(read_selected_text(text_area), '') journal:dismiss() @@ -1388,10 +1388,10 @@ function test.jump_begin_or_end_reset_selection() 'porttitor mi, vitae rutrum eros metus nec libero.', }, '\n')); - simulate_input_keys('KEYBOARD_CURSOR_UP_FAST') + simulate_input_keys('CUSTOM_CTRL_HOME') expect.eq(read_selected_text(text_area), '') - simulate_input_keys('KEYBOARD_CURSOR_DOWN_FAST') + simulate_input_keys('CUSTOM_CTRL_END') expect.eq(read_selected_text(text_area), '') journal:dismiss() @@ -1496,7 +1496,7 @@ function test.delete_char_delete_selection() 'porttitor mi, vitae rutrum ero', }, '\n')); - simulate_input_keys('CUSTOM_CTRL_D') + simulate_input_keys('CUSTOM_DELETE') expect.eq(read_rendered_text(text_area), table.concat({ '60: _ metus nec libero.', @@ -2236,7 +2236,7 @@ function test.restore_text_between_sessions() local journal, text_area = arrange_empty_journal({w=80,save_on_change=true}) simulate_input_keys('CUSTOM_CTRL_A') - simulate_input_keys('CUSTOM_CTRL_D') + simulate_input_keys('CUSTOM_DELETE') local text = table.concat({ '60: Lorem ipsum dolor sit amet, consectetur adipiscing elit.', @@ -2426,7 +2426,7 @@ function test.scroll_follows_cursor() 'Ut gravida tortor ac accumsan suscipit.', }, '\n')) - simulate_input_keys('KEYBOARD_CURSOR_UP_FAST') + simulate_input_keys('CUSTOM_CTRL_HOME') simulate_mouse_click(text_area, 0, 9) simulate_input_keys('KEYBOARD_CURSOR_DOWN') @@ -2861,7 +2861,7 @@ function test.fast_rewind_words_right() text_area:setCursor(1) journal:onRender() - simulate_input_keys('A_MOVE_E_DOWN') + simulate_input_keys('CUSTOM_CTRL_RIGHT') expect.eq(read_rendered_text(text_area), table.concat({ '60:_Lorem ipsum dolor sit amet, consectetur adipiscing ', @@ -2871,7 +2871,7 @@ function test.fast_rewind_words_right() 'libero.', }, '\n')); - simulate_input_keys('A_MOVE_E_DOWN') + simulate_input_keys('CUSTOM_CTRL_RIGHT') expect.eq(read_rendered_text(text_area), table.concat({ '60: Lorem_ipsum dolor sit amet, consectetur adipiscing ', @@ -2882,7 +2882,7 @@ function test.fast_rewind_words_right() }, '\n')); for i=1,6 do - simulate_input_keys('A_MOVE_E_DOWN') + simulate_input_keys('CUSTOM_CTRL_RIGHT') end expect.eq(read_rendered_text(text_area), table.concat({ @@ -2893,7 +2893,7 @@ function test.fast_rewind_words_right() 'libero.', }, '\n')); - simulate_input_keys('A_MOVE_E_DOWN') + simulate_input_keys('CUSTOM_CTRL_RIGHT') expect.eq(read_rendered_text(text_area), table.concat({ '60: Lorem ipsum dolor sit amet, consectetur adipiscing ', @@ -2903,7 +2903,7 @@ function test.fast_rewind_words_right() 'libero.', }, '\n')); - simulate_input_keys('A_MOVE_E_DOWN') + simulate_input_keys('CUSTOM_CTRL_RIGHT') expect.eq(read_rendered_text(text_area), table.concat({ '60: Lorem ipsum dolor sit amet, consectetur adipiscing ', @@ -2914,7 +2914,7 @@ function test.fast_rewind_words_right() }, '\n')); for i=1,17 do - simulate_input_keys('A_MOVE_E_DOWN') + simulate_input_keys('CUSTOM_CTRL_RIGHT') end expect.eq(read_rendered_text(text_area), table.concat({ @@ -2925,7 +2925,7 @@ function test.fast_rewind_words_right() 'libero._', }, '\n')); - simulate_input_keys('A_MOVE_E_DOWN') + simulate_input_keys('CUSTOM_CTRL_RIGHT') expect.eq(read_rendered_text(text_area), table.concat({ '60: Lorem ipsum dolor sit amet, consectetur adipiscing ', @@ -2948,7 +2948,7 @@ function test.fast_rewind_words_left() simulate_input_text(text) - simulate_input_keys('A_MOVE_W_DOWN') + simulate_input_keys('CUSTOM_CTRL_LEFT') expect.eq(read_rendered_text(text_area), table.concat({ '60: Lorem ipsum dolor sit amet, consectetur adipiscing ', @@ -2958,7 +2958,7 @@ function test.fast_rewind_words_left() '_ibero.', }, '\n')); - simulate_input_keys('A_MOVE_W_DOWN') + simulate_input_keys('CUSTOM_CTRL_LEFT') expect.eq(read_rendered_text(text_area), table.concat({ '60: Lorem ipsum dolor sit amet, consectetur adipiscing ', @@ -2969,7 +2969,7 @@ function test.fast_rewind_words_left() }, '\n')); for i=1,8 do - simulate_input_keys('A_MOVE_W_DOWN') + simulate_input_keys('CUSTOM_CTRL_LEFT') end expect.eq(read_rendered_text(text_area), table.concat({ @@ -2980,7 +2980,7 @@ function test.fast_rewind_words_left() 'libero.', }, '\n')); - simulate_input_keys('A_MOVE_W_DOWN') + simulate_input_keys('CUSTOM_CTRL_LEFT') expect.eq(read_rendered_text(text_area), table.concat({ '60: Lorem ipsum dolor sit amet, consectetur adipiscing ', @@ -2991,7 +2991,7 @@ function test.fast_rewind_words_left() }, '\n')); for i=1,16 do - simulate_input_keys('A_MOVE_W_DOWN') + simulate_input_keys('CUSTOM_CTRL_LEFT') end expect.eq(read_rendered_text(text_area), table.concat({ @@ -3002,7 +3002,7 @@ function test.fast_rewind_words_left() 'libero.', }, '\n')); - simulate_input_keys('A_MOVE_W_DOWN') + simulate_input_keys('CUSTOM_CTRL_LEFT') expect.eq(read_rendered_text(text_area), table.concat({ '_0: Lorem ipsum dolor sit amet, consectetur adipiscing ', @@ -3039,12 +3039,12 @@ function test.fast_rewind_reset_selection() 'porttitor mi, vitae rutrum eros metus nec libero.', }, '\n')); - simulate_input_keys('A_MOVE_W_DOWN') + simulate_input_keys('CUSTOM_CTRL_LEFT') expect.eq(read_selected_text(text_area), '') simulate_input_keys('CUSTOM_CTRL_A') - simulate_input_keys('A_MOVE_E_DOWN') + simulate_input_keys('CUSTOM_CTRL_RIGHT') expect.eq(read_selected_text(text_area), '') journal:dismiss()