Skip to content

Add Ctrl-Shift-Up and Ctrl-Shift-Down to editors #2959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to http://semver.org/spec/v2.0.0.html[Semantic Versioni
== https://github.com/robotframework/RIDE[Unreleased]

=== Added
- Added keyboard shortcuts ``Ctrl-Shift-Up`` and ``Ctrl-Shift-Down`` as alternatives to ``Alt-Up`` and ``Alt-Down`` to move rows in Grid and Text Editors.
- Added Settings Editor button to Preferences dialog, to edit settings.cfg.
- Created backup of settings.cfg to allow recovering some settings when broken upgrades.
- Added current executing keyword and other statuses to TestRunner status bar.
Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Likewise, the current version of wxPython, is 4.2.3, but RIDE is known to work w

`pip install -U robotframework-ride`

(3.8 <= python <= 3.13) Install current development version (**2.2dev29**) with:
(3.8 <= python <= 3.13) Install current development version (**2.2dev30**) with:

`pip install -U https://github.com/robotframework/RIDE/archive/develop.zip`

Expand Down
2 changes: 2 additions & 0 deletions src/robotide/application/CHANGELOG.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Changelog</title><link rel="stylesheet" type="text/css" href="docbook-xsl.css" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /></head><body><div xml:lang="en" class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id1337"></a>Changelog</h2></div></div><hr /></div><p>All notable changes to this project will be documented in this file.</p><p>The format is based on <a class="ulink" href="http://keepachangelog.com/en/1.0.0/" target="_top">Keep a Changelog</a>
and this project adheres to <a class="ulink" href="http://semver.org/spec/v2.0.0.html" target="_top">Semantic Versioning</a>.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_ulink_url_https_github_com_robotframework_ride_unreleased_ulink"></a>1. <a class="ulink" href="https://github.com/robotframework/RIDE" target="_top">Unreleased</a></h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_added"></a>1.1. Added</h3></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
Added keyboard shortcuts ``Ctrl-Shift-Up`` and ``Ctrl-Shift-Down`` as alternatives to ``Alt-Up`` and ``Alt-Down`` to move rows in Grid and Text Editors.
</li><li class="listitem">
Added Settings Editor button to Preferences dialog, to edit settings.cfg.
</li><li class="listitem">
Created backup of settings.cfg to allow recovering some settings when broken upgrades.
Expand Down
6 changes: 4 additions & 2 deletions src/robotide/application/releasenotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def set_content(self, html_win, content):

<p><a class="reference external" href="https://github.com/robotframework/RIDE/">RIDE (Robot Framework IDE)</a>
{VERSION} is a new release with some enhancements and bug fixes. The reference for valid arguments is
<a class="reference external" href="https://robotframework.org/">Robot Framework</a> current version, 7.2.2. However,
<a class="reference external" href="https://robotframework.org/">Robot Framework</a> current version, 7.3. However,
internal library code is originally based on version 3.1.2, but adapted for new versions.</p>
<ul class="simple">
<li>This version supports Python 3.8 up to 3.13 (and also tested on 3.14.a7 with wxPython 4.2.3).</li>
Expand All @@ -172,6 +172,8 @@ def set_content(self, html_win, content):
</ul>
<p><strong>New Features and Fixes Highlights</strong></p>
<ul class="simple">
<li>Added keyboard shortcuts <b>Ctrl-Shift-Up</b> and <b>Ctrl-Shift-Down</b> as alternatives to <b>Alt-Up</b> and
<b>Alt-Down</b> to move rows in Grid and Text Editors.</li>
<li>Improved vertical scroll in Grid Editor, by having main scroll bars out of cells.</li>
<li>Fixed Create Desktop Shortcut by pointing executable to <b>python -m robotide</b>.</li>
<li>Changed arguments parser to allow <b>--version</b> and <b>--help</b> functional in Windows.</li>
Expand Down Expand Up @@ -241,7 +243,7 @@ def set_content(self, html_win, content):
<pre class="literal-block">python -m robotide.postinstall -install</pre>
<p>or</p>
<pre class="literal-block">ride_postinstall.py -install</pre>
<p>RIDE {VERSION} was released on 28/May/2025.</p>
<p>RIDE {VERSION} was released on 06/June/2025.</p>
<!-- <br/>
<h3>May The Fourth Be With You!</h3>
<h3>Celebrate the bank holiday, 10th June, Day of Portugal, Portuguese Communities and Camões!!</h3>
Expand Down
8 changes: 4 additions & 4 deletions src/robotide/context/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,11 @@ def bind_keys_to_evt_menu(target, actions):
<td>Uncomment row(s)</td>
</tr>
<tr>
<td>Alt-Up</td>
<td>Alt-Up or Ctrl-Shift-Up</td>
<td>Move row(s) up</td>
</tr>
<tr>
<td>Alt-Down</td>
<td>Alt-Down or Ctrl-Shift-Down</td>
<td>Move row(s) down</td>
</tr>
<tr>
Expand Down Expand Up @@ -419,11 +419,11 @@ def bind_keys_to_evt_menu(target, actions):
<td>Make dictionary variable body</td>
</tr>
<tr>
<td>Alt-Up</td>
<td>Alt-Up or Ctrl-Shift-Up</td>
<td>Move row(s) up</td>
</tr>
<tr>
<td>Alt-Down</td>
<td>Alt-Down or Ctrl-Shift-Down</td>
<td>Move row(s) down</td>
</tr>
<tr>
Expand Down
8 changes: 4 additions & 4 deletions src/robotide/editor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def get_menudata():
edit_13 = _("Delete Cells | Delete Cells | Ctrlcmd-Shift-D\n")
edit_14 = _("Insert Rows | Insert Rows | Ctrlcmd-I\n")
edit_15 = _("Delete Rows | Delete Rows | Ctrlcmd-D\n")
edit_16 = _("Move Rows Up | Move Rows Up | Alt-Up\n")
edit_17 = _("Move Rows Down | Move Rows Down | Alt-Down\n")
edit_16 = _("Move Rows Up (Alt-Up or Ctrl-Shift-Up) | Move Rows Up\n")
edit_17 = _("Move Rows Down (Alt-Down or Ctrl-Shift-Down) | Move Rows Down\n")
tools_0 = _("[Tools]\n")
tools_1 = _("Content Assistance (Ctrl-Space or Ctrl-Alt-Space) | Show possible keyword and variable completions"
" | | | POSITION-70\n")
Expand Down Expand Up @@ -75,8 +75,8 @@ def get_menudata():
Delete Cells | Delete Cells | Ctrlcmd-Shift-D
Insert Rows | Insert Rows | Ctrlcmd-I
Delete Rows | Delete Rows | Ctrlcmd-D
Move Rows Up | Move Rows Up | Alt-Up
Move Rows Down | Move Rows Down | Alt-Down
Move Rows Up (Alt-Up or Ctrl-Shift-Up) | Move Rows Up
Move Rows Down (Alt-Down or Ctrl-Shift-Down) | Move Rows Down
[Tools]
Content Assistance (Ctrl-Space or Ctrl-Alt-Space) | Show possible keyword and variable completions | | | POSITION-70
"""
Expand Down
10 changes: 10 additions & 0 deletions src/robotide/editor/kweditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,11 @@ def _call_ctrl_shift_function(self, event: object, keycode: int):
self.on_json_editor(event)
elif keycode == ord('D'):
self.on_delete_cells()
elif keycode in (wx.WXK_UP, wx.WXK_DOWN):
if keycode == wx.WXK_UP:
self.on_move_rows_up(event)
else:
self.on_move_rows_down(event)
"""
elif keycode == ord('3'):
self._open_cell_editor_and_execute_sharp_comment()
Expand Down Expand Up @@ -869,6 +874,11 @@ def _call_alt_function(self, event, keycode: int):
else:
self._move_cursor_down(event)
return False # event must not be skipped in this case
elif keycode in (wx.WXK_UP, wx.WXK_DOWN):
if keycode == wx.WXK_UP:
self.on_move_rows_up(event)
else:
self.on_move_rows_down(event)
return True

def on_key_down(self, event):
Expand Down
7 changes: 7 additions & 0 deletions src/robotide/editor/texteditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1843,6 +1843,13 @@ def on_key_down(self, event):
self.indent_block()
self.mark_file_dirty(self.source_editor.GetModify())
return
elif (((event.ControlDown() and event.ShiftDown()) or event.AltDown()) and
event.GetKeyCode() in (wx.WXK_UP, wx.WXK_DOWN)):
if event.GetKeyCode() == wx.WXK_UP:
self.on_move_rows_up(event)
else:
self.on_move_rows_down(event)
return
elif event.GetKeyCode() == wx.WXK_TAB and event.ShiftDown():
selected = self.source_editor.GetSelection()
if selected[0] == selected[1]:
Expand Down
Loading