Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-12

Text selection with numeric keypad on Linux

16 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bernd Mueller

Hello,

on Windows the text selection is possible via the numeric keypad in conjunction with the Shift key. For example Shift-End selects the text from the current cursor position to the end of the line.

But this does not work on Linux (Ubuntu 8x, 10x in my case). The Lazarus editor seems to ignore the key combination.

I tried then to extend the Key Mappings for the "Select line end" command with an alternative key. So I "grabbed" the key combination Shift-End and saved the settings. But the editor behavior did not change.

BTW there is a difference between Windows and Linux, when I use the "Grab key" feature. When I press Shift-End on Linux, the dialog recognizes only the Numpad 1 key. On Windows, the correct key combination (Shift-End) is shown.

Any hints, how I can enable the desired text selection on Linux?

Thanks. Regards, Bernd.

Reply by email

Hans-Peter Diettrich
to Bernd Mueller
Show quoted text 8 lines
Hello, on Windows the text selection is possible via the numeric keypad in conjunction with the Shift key. For example Shift-End selects the text from the current cursor position to the end of the line. But this does not work on Linux (Ubuntu 8x, 10x in my case). The Lazarus editor seems to ignore the key combination.

This may be a Linux problem. Traditionally the Shift key inverts NumLock for the numeric keypad. Not every Linux offers an option "Windows compatible Shift key behaviour".

What happens in any other editor, when you press Shift-End etc.?

DoDi

Reply by email

Mattias Gaertner
to Hans-Peter Diettrich

Hans-Peter Diettrich hat am 20. Dezember 2012 um 15:02 geschrieben:

Show quoted text 15 lines
Bernd Mueller schrieb: > Hello, > > on Windows the text selection is possible via the numeric keypad in > conjunction with the Shift key. For example Shift-End selects the text > from the current cursor position to the end of the line. > > But this does not work on Linux (Ubuntu 8x, 10x in my case). The Lazarus > editor seems to ignore the key combination. This may be a Linux problem. Traditionally the Shift key inverts NumLock for the numeric keypad. Not every Linux offers an option "Windows compatible Shift key behaviour". What happens in any other editor, when you press Shift-End etc.?

The standard Text Editor 'gedit' inserts a '1', same as Lazarus.

Mattias

Reply by email

Bernd Mueller
to Mattias Gaertner
Mattias Gaertner wrote 18 lines
Hans-Peter Diettrich hat am 20. Dezember 2012 um 15:02 geschrieben: > Bernd Mueller schrieb: >> Hello, >> >> on Windows the text selection is possible via the numeric keypad in >> conjunction with the Shift key. For example Shift-End selects the text >> from the current cursor position to the end of the line. >> >> But this does not work on Linux (Ubuntu 8x, 10x in my case). The Lazarus >> editor seems to ignore the key combination. > This may be a Linux problem. Traditionally the Shift key inverts NumLock > for the numeric keypad. Not every Linux offers an option "Windows > compatible Shift key behaviour". > > What happens in any other editor, when you press Shift-End etc.? The standard Text Editor 'gedit' inserts a '1', same as Lazarus.

I have have "Shift with numeric keypad keys works as in MS Windows" enabled and gedit selects the whole line, in contrary to Lazarus, on my system.

Regards, Bernd.

Reply by email

Mattias Gaertner
to Bernd Mueller

Bernd Mueller hat am 20. Dezember 2012 um 16:01 geschrieben:

Show quoted text 24 lines
Mattias Gaertner wrote: > Hans-Peter Diettrich hat am 20. Dezember 2012 um > 15:02 > geschrieben: >> Bernd Mueller schrieb: >>> Hello, >>> >>> on Windows the text selection is possible via the numeric keypad in >>> conjunction with the Shift key. For example Shift-End selects the text >>> from the current cursor position to the end of the line. >>> >>> But this does not work on Linux (Ubuntu 8x, 10x in my case). The Lazarus >>> editor seems to ignore the key combination. >> This may be a Linux problem. Traditionally the Shift key inverts NumLock >> for the numeric keypad. Not every Linux offers an option "Windows >> compatible Shift key behaviour". >> >> What happens in any other editor, when you press Shift-End etc.? > > The standard Text Editor 'gedit' inserts a '1', same as Lazarus. I have have "Shift with numeric keypad keys works as in MS Windows" enabled and gedit selects the whole line, in contrary to Lazarus, on my system.

In that case the GTK sends for Shift+Numpad 1 a "Numpad 1" key (without the Shift).
You can grab that key ("Numpad 1" without Shift) to the "Select Line End" key mapping of Lazarus. The Shift+Numpad 1 selects til the end.

Mattias

Reply by email

Graeme Geldenhuys
to Mattias Gaertner: Hans-Peter Diettrich hat am 20. Dezember 2012 um 15:02 geschrieben: The standard Text…
Mattias Gaertner wrote
> > What happens in any other editor, when you press Shift-End etc.? The standard Text Editor 'gedit' inserts a '1', same as Lazarus.

I have an even bigger problem. My keyboard doesn't have a numeric keypad! ;-)

Filco Majestouch 2 (Tenkeyless with mechanical blue clicky switches)

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Hans-Peter Diettrich
to Mattias Gaertner: Hans-Peter Diettrich hat am 20. Dezember 2012 um 15:02 geschrieben: The standard Text…
Show quoted text 9 lines
>> But this does not work on Linux (Ubuntu 8x, 10x in my case). The Lazarus >> editor seems to ignore the key combination. > This may be a Linux problem. Traditionally the Shift key inverts NumLock > for the numeric keypad. Not every Linux offers an option "Windows > compatible Shift key behaviour". > > What happens in any other editor, when you press Shift-End etc.? The standard Text Editor 'gedit' inserts a '1', same as Lazarus.

Then it's time to configure the Linux keyboard for Windows-compatible handling of the Shift key, if desired. Lazarus cannot do anything when the Linux keyboard handler returns '1' for that key combination.

Big keyboards have dedicated End etc. keys, in/above the cursor key block, which should work together with Shift as on Windows. But notebook keyboards (mine) may not have such keys :-(

DoDi

Reply by email

Bernd Mueller
to Mattias Gaertner: Bernd Mueller hat am 20. Dezember 2012 um 16:01 geschrieben: In that case the GTK sends…
Mattias Gaertner wrote 5 lines
In that case the GTK sends for Shift+Numpad 1 a "Numpad 1" key (without the Shift). You can grab that key ("Numpad 1" without Shift) to the "Select Line End" key mapping of Lazarus. The Shift+Numpad 1 selects til the end.

thank you, that works.

Now I have the problem with Shift-Up and Shift-Down. I want to replace these keys too, but I can not find the corresponding commands.

I used the "Find key combination" in the "Key Mappings" dialog and "grabbed" then for Shift-Up. Then the filter is active, but there is no single command available in the list box. The list box is completely empty. The same for Shift-Down. Aren't these keys not mappable?

Regards, Bernd.

Reply by email

Mattias Gaertner
to Bernd Mueller: thank you, that works. Now I have the problem with Shift-Up and Shift-Down. I want to…

Bernd Mueller hat am 20. Dezember 2012 um 17:31 geschrieben:

Show quoted text 12 lines
Mattias Gaertner wrote: > > In that case the GTK sends for Shift+Numpad 1 a "Numpad 1" key (without the > Shift). > You can grab that key ("Numpad 1" without Shift) to the "Select Line End" > key > mapping of Lazarus. The Shift+Numpad 1 selects til the end. thank you, that works. Now I have the problem with Shift-Up and Shift-Down. I want to replace these keys too, but I can not find the corresponding commands.

Text selection commands: Select Up and Select Down.

I used the "Find key combination" in the "Key Mappings" dialog and "grabbed" then for Shift-Up. Then the filter is active, but there is no single command available in the list box. The list box is completely empty. The same for Shift-Down. Aren't these keys not mappable?

Here the filter shows "Select Up".

Mattias

Reply by email

Paul Breneman
to Graeme Geldenhuys: I have an even bigger problem. My keyboard doesn't have a numeric keypad! ;-) Filco…
Graeme Geldenhuys wrote
I have an even bigger problem. My keyboard doesn't have a numeric keypad! ;-) Filco Majestouch 2 (Tenkeyless with mechanical blue clicky switches)

That wouldn't work for me! I have four mini Logitech keyboards where I use the numeric keypad for cursor control (Num Lock OFF).

I've been using the same text editor (IBM XEdit clone) since 1985 and that is *way* too long to revert to something else. :)

http://www.kedit.com/
http://hessling-editor.sourceforge.net/

Reply by email

Graeme Geldenhuys
to Paul Breneman
Paul Breneman wrote 5 lines
> > Filco Majestouch 2 (Tenkeyless with mechanical blue clicky switches) That wouldn't work for me! I have four mini Logitech keyboards where I use the numeric keypad for cursor control (Num Lock OFF).

I still have cursor control. The inverted "T" arrow keys an the 2x3 (Ins,Del,Home,etc) are all still there (unmangled - unlike so many keyboards these days). The Filco Tenkeyless (ten-key-less) simply chops off the 10 keys that make up the numeric keypad.

http://www.keyboardco.com/keyboard_images/filco_majestouch_tenkeyless_red_us_small.jpg

I've been using the same text editor (IBM XEdit clone) since 1985 and that is *way* too long to revert to something else. :)

I'm also a creature of habit. :-)

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Bernd Mueller
to Mattias Gaertner: Bernd Mueller hat am 20. Dezember 2012 um 17:31 geschrieben: Text selection commands:…
Mattias Gaertner wrote 11 lines
Text selection commands: Select Up and Select Down. > I used the "Find key combination" in the "Key Mappings" dialog and > "grabbed" then for Shift-Up. Then the filter is active, but there is no > single command available in the list box. The list box is completely > empty. The same for Shift-Down. Aren't these keys not mappable? Here the filter shows "Select Up".

strange, please see attached screen shot. There is no text selection command for Select Up and Select Down available. I tried with Lazarus 1.0.4 on Ubuntu 10.04 and Lazarus 1.0 on Windows 98. Does this only work with the trunk version of Lazarus?

Regards, Bernd.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Filter shift_up.png
Type: image/png
Size: 69026 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20121221/75720dc4/attachment-0001.png>

Reply by email

Martin
to Bernd Mueller
Bernd Mueller wrote 9 lines
Mattias Gaertner wrote: > > > Here the filter shows "Select Up". > strange, please see attached screen shot. There is no text selection command for Select Up and Select Down available. I tried with Lazarus 1.0.4 on Ubuntu 10.04 and Lazarus 1.0 on Windows 98. Does this only work with the trunk version of Lazarus?

Yes, they where only made configurable, recently

Reply by email

Bernd Mueller
to Martin
Martin wrote 12 lines
On 21/12/2012 09:17, Bernd Mueller wrote: > Mattias Gaertner wrote: >> >> >> Here the filter shows "Select Up". >> > strange, please see attached screen shot. There is no text selection > command for Select Up and Select Down available. I tried with Lazarus > 1.0.4 on Ubuntu 10.04 and Lazarus 1.0 on Windows 98. Does this only > work with the trunk version of Lazarus? Yes, they where only made configurable, recently

if there is a version 1.0.6 in the works, could this be merged back?

Regards, Bernd.

Reply by email

Martin
to Bernd Mueller
Bernd Mueller wrote 17 lines
Martin wrote: > On 21/12/2012 09:17, Bernd Mueller wrote: >> Mattias Gaertner wrote: >>> >>> >>> Here the filter shows "Select Up". >>> >> strange, please see attached screen shot. There is no text selection >> command for Select Up and Select Down available. I tried with >> Lazarus 1.0.4 on Ubuntu 10.04 and Lazarus 1.0 on Windows 98. Does >> this only work with the trunk version of Lazarus? > > Yes, they where only made configurable, recently if there is a version 1.0.6 in the works, could this be merged back? Regards, Bernd.

Probably yes.

Someone needs to find the revision. It will be one of my commits. I am away for a week, I will have a look when I am back.

Mail me again, if I havent got to it after 1st week of January

Reply by email