Skip to content

Commit 232ae64

Browse files
Add Ctrl-Shift-Up and Ctrl-Shift-Down to editors (#2959)
1 parent 319e8d5 commit 232ae64

File tree

64 files changed

+18275
-18470
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+18275
-18470
lines changed

CHANGELOG.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to http://semver.org/spec/v2.0.0.html[Semantic Versioni
99
== https://github.com/robotframework/RIDE[Unreleased]
1010

1111
=== Added
12+
- 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.
1213
- Added Settings Editor button to Preferences dialog, to edit settings.cfg.
1314
- Created backup of settings.cfg to allow recovering some settings when broken upgrades.
1415
- Added current executing keyword and other statuses to TestRunner status bar.

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Likewise, the current version of wxPython, is 4.2.3, but RIDE is known to work w
4141

4242
`pip install -U robotframework-ride`
4343

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

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

src/robotide/application/CHANGELOG.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!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>
33
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">
4+
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.
5+
</li><li class="listitem">
46
Added Settings Editor button to Preferences dialog, to edit settings.cfg.
57
</li><li class="listitem">
68
Created backup of settings.cfg to allow recovering some settings when broken upgrades.

src/robotide/application/releasenotes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def set_content(self, html_win, content):
150150
151151
<p><a class="reference external" href="https://github.com/robotframework/RIDE/">RIDE (Robot Framework IDE)</a>
152152
{VERSION} is a new release with some enhancements and bug fixes. The reference for valid arguments is
153-
<a class="reference external" href="https://robotframework.org/">Robot Framework</a> current version, 7.2.2. However,
153+
<a class="reference external" href="https://robotframework.org/">Robot Framework</a> current version, 7.3. However,
154154
internal library code is originally based on version 3.1.2, but adapted for new versions.</p>
155155
<ul class="simple">
156156
<li>This version supports Python 3.8 up to 3.13 (and also tested on 3.14.a7 with wxPython 4.2.3).</li>
@@ -172,6 +172,8 @@ def set_content(self, html_win, content):
172172
</ul>
173173
<p><strong>New Features and Fixes Highlights</strong></p>
174174
<ul class="simple">
175+
<li>Added keyboard shortcuts <b>Ctrl-Shift-Up</b> and <b>Ctrl-Shift-Down</b> as alternatives to <b>Alt-Up</b> and
176+
<b>Alt-Down</b> to move rows in Grid and Text Editors.</li>
175177
<li>Improved vertical scroll in Grid Editor, by having main scroll bars out of cells.</li>
176178
<li>Fixed Create Desktop Shortcut by pointing executable to <b>python -m robotide</b>.</li>
177179
<li>Changed arguments parser to allow <b>--version</b> and <b>--help</b> functional in Windows.</li>
@@ -241,7 +243,7 @@ def set_content(self, html_win, content):
241243
<pre class="literal-block">python -m robotide.postinstall -install</pre>
242244
<p>or</p>
243245
<pre class="literal-block">ride_postinstall.py -install</pre>
244-
<p>RIDE {VERSION} was released on 28/May/2025.</p>
246+
<p>RIDE {VERSION} was released on 06/June/2025.</p>
245247
<!-- <br/>
246248
<h3>May The Fourth Be With You!</h3>
247249
<h3>Celebrate the bank holiday, 10th June, Day of Portugal, Portuguese Communities and Camões!!</h3>

src/robotide/context/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,11 @@ def bind_keys_to_evt_menu(target, actions):
258258
<td>Uncomment row(s)</td>
259259
</tr>
260260
<tr>
261-
<td>Alt-Up</td>
261+
<td>Alt-Up or Ctrl-Shift-Up</td>
262262
<td>Move row(s) up</td>
263263
</tr>
264264
<tr>
265-
<td>Alt-Down</td>
265+
<td>Alt-Down or Ctrl-Shift-Down</td>
266266
<td>Move row(s) down</td>
267267
</tr>
268268
<tr>
@@ -419,11 +419,11 @@ def bind_keys_to_evt_menu(target, actions):
419419
<td>Make dictionary variable body</td>
420420
</tr>
421421
<tr>
422-
<td>Alt-Up</td>
422+
<td>Alt-Up or Ctrl-Shift-Up</td>
423423
<td>Move row(s) up</td>
424424
</tr>
425425
<tr>
426-
<td>Alt-Down</td>
426+
<td>Alt-Down or Ctrl-Shift-Down</td>
427427
<td>Move row(s) down</td>
428428
</tr>
429429
<tr>

src/robotide/editor/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def get_menudata():
4545
edit_13 = _("Delete Cells | Delete Cells | Ctrlcmd-Shift-D\n")
4646
edit_14 = _("Insert Rows | Insert Rows | Ctrlcmd-I\n")
4747
edit_15 = _("Delete Rows | Delete Rows | Ctrlcmd-D\n")
48-
edit_16 = _("Move Rows Up | Move Rows Up | Alt-Up\n")
49-
edit_17 = _("Move Rows Down | Move Rows Down | Alt-Down\n")
48+
edit_16 = _("Move Rows Up (Alt-Up or Ctrl-Shift-Up) | Move Rows Up\n")
49+
edit_17 = _("Move Rows Down (Alt-Down or Ctrl-Shift-Down) | Move Rows Down\n")
5050
tools_0 = _("[Tools]\n")
5151
tools_1 = _("Content Assistance (Ctrl-Space or Ctrl-Alt-Space) | Show possible keyword and variable completions"
5252
" | | | POSITION-70\n")
@@ -75,8 +75,8 @@ def get_menudata():
7575
Delete Cells | Delete Cells | Ctrlcmd-Shift-D
7676
Insert Rows | Insert Rows | Ctrlcmd-I
7777
Delete Rows | Delete Rows | Ctrlcmd-D
78-
Move Rows Up | Move Rows Up | Alt-Up
79-
Move Rows Down | Move Rows Down | Alt-Down
78+
Move Rows Up (Alt-Up or Ctrl-Shift-Up) | Move Rows Up
79+
Move Rows Down (Alt-Down or Ctrl-Shift-Down) | Move Rows Down
8080
[Tools]
8181
Content Assistance (Ctrl-Space or Ctrl-Alt-Space) | Show possible keyword and variable completions | | | POSITION-70
8282
"""

src/robotide/editor/kweditor.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,11 @@ def _call_ctrl_shift_function(self, event: object, keycode: int):
794794
self.on_json_editor(event)
795795
elif keycode == ord('D'):
796796
self.on_delete_cells()
797+
elif keycode in (wx.WXK_UP, wx.WXK_DOWN):
798+
if keycode == wx.WXK_UP:
799+
self.on_move_rows_up(event)
800+
else:
801+
self.on_move_rows_down(event)
797802
"""
798803
elif keycode == ord('3'):
799804
self._open_cell_editor_and_execute_sharp_comment()
@@ -869,6 +874,11 @@ def _call_alt_function(self, event, keycode: int):
869874
else:
870875
self._move_cursor_down(event)
871876
return False # event must not be skipped in this case
877+
elif keycode in (wx.WXK_UP, wx.WXK_DOWN):
878+
if keycode == wx.WXK_UP:
879+
self.on_move_rows_up(event)
880+
else:
881+
self.on_move_rows_down(event)
872882
return True
873883

874884
def on_key_down(self, event):

src/robotide/editor/texteditor.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1843,6 +1843,13 @@ def on_key_down(self, event):
18431843
self.indent_block()
18441844
self.mark_file_dirty(self.source_editor.GetModify())
18451845
return
1846+
elif (((event.ControlDown() and event.ShiftDown()) or event.AltDown()) and
1847+
event.GetKeyCode() in (wx.WXK_UP, wx.WXK_DOWN)):
1848+
if event.GetKeyCode() == wx.WXK_UP:
1849+
self.on_move_rows_up(event)
1850+
else:
1851+
self.on_move_rows_down(event)
1852+
return
18461853
elif event.GetKeyCode() == wx.WXK_TAB and event.ShiftDown():
18471854
selected = self.source_editor.GetSelection()
18481855
if selected[0] == selected[1]:

0 commit comments

Comments
 (0)