Q. TSE for Linux: How to give TSE for Linux WSL and non-WSL full functionality and as much as possible compatibility with TSE For Windows? Checking: Hotkeys

16 views
Skip to first unread message

knud van eeden

unread,
May 29, 2025, 3:51:41 PM5/29/25
to SemWare TSE Pro Text Editor
 Q. TSE for Linux: How to give TSE for Linux WSL and non-WSL full functionality and as much as possible compatibility with TSE For Windows? Checking: Hotkeys

1. -Goal: the keys should be used in a same way by the user on all the
          operating systems that TSE version is running on. This
          without too much thinking and repeated troubleshooting by the user, in
          the easiest, simplest and quickest way.

2. -Here e.g.

 1. TSE for Microsoft Windows

 2. TSE for Linux WSL

 3. TSE for Linux non-WSL

3. -When pressing the *same* key combination on each 3 operating systems:

     1. -This works on all 3:

          <Ctrl PgUp> Goes to the begin of the file in TSE for Microsoft Windows

          <Ctrl PgUp> Goes to the begin of the file in TSE for Linux WSL

          <Ctrl PgUp> Goes to the begin of the file in TSE for Linux non-WSL

     2. -This does not work on all 3:

          <CtrlAlt Spacebar> Shows the TSE version in TSE for Microsoft Windows

          <CtrlAlt Spacebar> Shows the TSE version in TSE for Linux WSL

          <CtrlAlt Spacebar> Does *not* show the TSE version in TSE for Linux non-WSL because this generates (use e.g. ShowKey) instead <Ctrl Alt `>)

3. So to give as much as possible similar key functionality to TSE running on different
   Linux distributions and Microsoft Windows, where is given the fact that it is
   *impossible* to use the same keys in all, one is forced to use
   different .ui files and recompile your TSE with that .ui on that
   particular Linux distribution.

4. -Mote: At the moment out of the box TSE for Linux is by default compiled with tse.ui
          (Note: you can see which .ui is used by looking in the
                 TSE for Linux menu > 'Help' > 'About')

5. -Solution: Create, deliver and use during the installation 3 different .ui files

     1. -a separate TSE.UI for TSE for Microsoft Windows, e.g. tse.ui

     2. -a separate TSE.UI for TSE for WSL Linux, e.g. tselinuxwsl.ui (to be created)

     3. -a separate TSE.UI for TSE for Linux, e.g. tselinuxnonwsl.ui (to be created)

6. -Then compile your TSE with that particular .ui file

     sc32.exe -b tse.ui on TSE for Microsoft Windows

     ./sc32 -b tse.ui on TSE for Linux WSL

     ./sc32 -B tselinuxwsl.ui on TSE for Linux WSL

     ./sc32 -B tselinuxnonwsl.ui on TSE for Linux non-WSL

7. -By using these steps you will then be able to use the SAME key
    combinations out of the box on all 3 different operating systems.

8. -So next step: To do:

     1. -Testing which key combinations are the same on all 3 and extract those as a first choice.

     2. -Testing which key combinations do not work e.g. because of different keycombinations are generated and choose alternatives

     3. -Other things to check and apply to get the alternative .ui files

     4. -Supply those .ui files for possible inclusing in one of the next versions of TSE for Linux.

with friendly greetings
Knud van Eeden


knud van eeden

unread,
May 29, 2025, 4:34:17 PM5/29/25
to SemWare TSE Pro Text Editor
     5. -Possible best solution is to add the newly defined keys at the END of the tse.ui file
         (because by TSE design only the LAST added and found KEYES are active, not the earlier
          defined keys) and then using this new to be created by Semware 'LINUXWSL' compiler
          directive)

          #IFDEF LINUXWSL

             // here the TSE for Linux WSL keys

          #ELSE

            #IFDEF LINUX

             // here the TSE for Linux non-WSL keys

            #ENDDEF

          #ENDIF

         to include the alternative key definition for respective TSE
         for Linux WSL versus TSE for Linux non-WSL in order to avoid
         quadruple duplicate work by having to maintain 4 different .ui
         files:

          tse.ui for Microsoft Windows

          tse.ui default for TSE for Linux

          tse.ui new for TSE for Linux WSL

          tse.ui new for TSE for LINUX non-WSL

         So then only 1 tse.ui (=default delivered with the installation .zip
         of TSE for Linux), but then with 2 key definitions at the end
         of that default tse.ui file.



--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/semware/1849596128.2853326.1748548296770%40mail.yahoo.com.

zhong zhao

unread,
May 29, 2025, 9:08:39 PM5/29/25
to SemWare TSE Pro text editor
It seems that a hot key authoritarian government needs to be established.
(^_^)

knud van eeden

unread,
May 30, 2025, 6:33:14 AM5/30/25
to SemWare TSE Pro Text Editor
 Q. TSE: Linux: How to give TSE Linux WSL and non-WSL full functionality and as much as compatibility with TSE For Windows? Checking: Hotkeys

===

See attachment:

keyassignmentreplacementtseforlinux.ui

===

See also inline screenshot below

===

Steps to install:

1. backup your TSE 'e'

    cp e eORIGINAL

2. backup your TSE ui/tse.ui

    cp tse.ui tseORIGINAL.ui

3. copy attachment

    keyassignmentreplacementtseforlinux.ui

   into the TSE ui directory

4. edit your tse.ui file and add this line at the very end / bottom of the file test.ui
   (that file must thus be located in your tse/ui directory)

    #include "ui/keyassignmentreplacementtseforlinux.ui"

5. save your tse.ui file

6. make sure you have no TSE 'e' running

7. goto the tse directory in a terminal and type

    ./sc32 -B ui/tse.ui

8. that should compile successfully and show some warnings about duplicate keys which can just be ignored.

9. starting TSE

    ./e

   uses now these alternative key assignments
   (which you of course can change to your liking if wanting so, then recompile with sc32 again)

10. Tested successfully with
     TSE for Linux version 4.50 official release
     on Linux WSL Ubuntu
     and TSE for Linux non-WSL Ubuntu
    

===

Rules:

1. -Choose new key assignment if this occurs or in TSE for Linux WSL or in TSE for Linux non-WSL: 'does not show anything in showkey'.

2. -Choose new key assignment if this occurs or in TSE for Linux WSL or in TSE for Linux non-WSL: 'reserved: taken and used by the operating system'

3. -Define the key assignment to the old Linux generated key, given that that generated key not already occurs in tse.ui. E.g. redefine '<CtrlAlt Backspace> lVersion()' as the Linux generated '<CtrlAlt `> lVersion()'

===

Then just add these at lines at the very end of your tse.ui and reompile your tse with

 ./sc32 -B ui/tse.ui

===

You will only have to lookup then the new key assignments what the new
key combination is for that command.

===

But making it even more transparent and independent, just adding a
#include line at the end of the tse.ui

If you put it in the same directory as 'sc32' you can use:

 #include keyassignmentreplacementtseforlinux.ui

otherwise if putting it in the ui directory you have to use

 #include "ui/keyassignmentreplacementtseforlinux.ui"

at the end of the original default Semware Linux tse.ui and then
including that file with the below new replacing key information which so
overrules the default key assignments.

===

But now more keys should probably work more than expected quite the
same on assumed maybe all Linux versions.

===

Here below an initial new key assignment, subject to change where it
shows necessary and or more convenient and or better and or otherwise.

===

--- cut here: begin --------------------------------------------------
// -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// NEW KEY ASSIGMENT       // COMMAND                                // OLD KEY ASSIGMENT      // TYPE                                       // WHAT HAPPENED IN TSE FOR LINUX WSL BEFORE? ('+' IS OK)          // WHAT HAPPENED IN TSE FOR LINUX NON-WSL BEFORE? ('+' IS OK)
// -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   <Ctrl s><7>                RollLeft()                             // <Alt F5>               // new arbitrarily chosen keys                // +                                                               // - does not show anything in showkey
   <Ctrl s><g>                RollRight()                            // <Alt F6>               // new arbitrarily chosen keys                // +                                                               // - reserved: taken and used by the operating system
   <Ctrl h>                   DelLeftWord()                          // <Ctrl Backspace>       // you can now use again <Ctrl Backspace>     // - <Ctrl h>                                                      // - <Ctrl h>
   <Ctrl s><3>                InsertLine()                           // <Alt F2>               // new arbitrarily chosen keys                // +                                                               // - reserved: taken and used by the operating system
   <Ctrl s><->                mCopyCharAbove()                       // <Ctrl ->               // new arbitrarily chosen keys                // - does not show anything in showkey                             // - reserved: taken and used by the operating system
   <Ctrl s><4>                mLower()                               // <Alt F4>               // new arbitrarily chosen keys                // - That shows a lot of keys: <Alt [> <1> <;> <3> <S>             // - reserved: taken and used by the operating system
   <Ctrl s><r>                Redo()                                 // <AltShift BackSpace>   // new arbitrarily chosen keys                // - <CtrlAlt H>                                                   // - <Alt Backspace>
   <Ctrl s><8>                ExecMacro("quote")                     // <Ctrl 8>               // new arbitrarily chosen keys                // - does not show anything in showkey                             // - <Backspace>
   <Ctrl s><q>                ExecMacro("quote cmt")                 // <CtrlShift 8>          // new arbitrarily chosen keys                // - does not show anything in showkey                             // - does not show anything in showkey
   <Ctrl s><w>                CopyToWinClip()                        // <Ctrl Ins>             // new arbitrarily chosen keys                // - <Alt [>                                                       // - does not show anything in showkey
   <Ctrl s><s>                PasteFromWinClip()                     // <Shift Ins>            // new arbitrarily chosen keys                // - That shows a lot of keys: <Alt [> <2> <;> <2> <~>             // - <Spacebar>
   <Ctrl s><c>                Copy()                                 // <Grey+>                // new arbitrarily chosen keys                // - <+>                                                           // - <+>
   <Ctrl s><k>                CopyToWinClip()                        // <CtrlShift Grey+>      // new arbitrarily chosen keys                // - does not show anything in showkey                             // - does not show anything in showkey
   <Ctrl s><5>                CutToWinClip()                         // <CtrlShift Grey->      // new arbitrarily chosen keys                // - does not show anything in showkey                             // - does not show anything in showkey
   <Ctrl s><t>                Cut()                                  // <Grey->                // new arbitrarily chosen keys                // - <->                                                           // - does not show anything in showkey
   <Ctrl s><a>                CopyAppend()                           // <Ctrl Grey+>           // new arbitrarily chosen keys                // - does not show anything in showkey                             // - does not show anything in showkey
   <Ctrl s><n>                CutAppend()                            // <Ctrl Grey->           // new arbitrarily chosen keys                // - does not show anything in showkey                             // - does not show anything in showkey
   <Ctrl s><p>                Paste()                                // <Grey*>                // new arbitrarily chosen keys                // <*>                                                             // - <*>
   <Ctrl s><o>                Paste(_OVERWRITE_)                     // <Ctrl Grey*>           // new arbitrarily chosen keys                // - does not show anything in showkey                             // - <*>
   <Ctrl s><o>                Paste(_OVERWRITE_)                     // <Ctrl PrtSc>           // new arbitrarily chosen keys                // - does not show anything in showkey                             // - does not show anything in showkey
   <Ctrl s><f>                PasteFromWinClip()                     // <CtrlShift Grey*>      // new arbitrarily chosen keys                // - does not show anything in showkey                             // - <*>
   <Ctrl s><[>                Gotoblockbegin()                       // <Ctrl [>               // new arbitrarily chosen keys                // - does not show anything in showkey                             // - <Escape>
   <Ctrl s><]>                Gotoblockend()                         // <Ctrl ]>               // new arbitrarily chosen keys                // - does not show anything in showkey                             // +
   <Ctrl s><6>                GotoMark()                             // <Ctrl 6>               // new arbitrarily chosen keys                // - does not show anything in showkey                             // - <Ctrl ^>
   <Ctrl s><2>                PlaceMark()                            // <Ctrl 2>               // new arbitrarily chosen keys                // - <Ctrl `>                                                      // - <Ctrl `>
   <Ctrl s><i>                ExecMacro("isrch")                     // <Ctrl i>               // new arbitrarily chosen keys                // - <Tab>                                                         // - <Tab>
   <Ctrl s><l>                Repeatfind()                           // <Ctrl l>               // new arbitrarily chosen keys                // +                                                               // - <Ctrl l>
   <Ctrl s><b>                RepeatFind(_REVERSE_)                  // <CtrlShift l>          // new arbitrarily chosen keys                // - <Ctrl l>                                                      // - <Ctrl l>
   <Ctrl s><=>                mFindWordAtCursor('b')                 // <Ctrl =>               // new arbitrarily chosen keys                // - does not show anything in showkey                             // - <=>
   <Ctrl s><v>                ViewFinds()                            // <AltShift v>           // new arbitrarily chosen keys                // - <Alt v>                                                       // - <Alt v>
   <Ctrl s><e>                ExecScrapMacro()                       // <Ctrl Enter>           // new arbitrarily chosen keys                // - <Ctrl j>                                                      // - <Enter>
   <Ctrl s><m>                RecordKeyMacro()                       // <Ctrl m>               // new arbitrarily chosen keys                // - <Enter>                                                       // + <Enter>
   <Ctrl s><0>                mListRecentFiles()                     // <Ctrl 0>               // new arbitrarily chosen keys                // - does not show anything in showkey                             // - does not show anything in showkey
   <Ctrl s><1>                MainMenu()                             // <F10>                  // new arbitrarily chosen keys                // +                                                               // - does not show anything in showkey
   <Ctrl s><9>                ShowEntryScreen()                      // <Alt F10>              // new arbitrarily chosen keys                // +                                                               // - reserved: taken and used by the operating system
   <Ctrl s><h>                ExecMacro("potpourr")                  // <Shift F10>            // new arbitrarily chosen keys                // +                                                               // - reserved: taken and used by the operating system
   <CtrlAlt `>                lVersion()                             // <CtrlAlt SpaceBar>     // new arbitrarily chosen keys                // - <CtrlAlt `>                                                   // - <CtrlAlt `>
   <Ctrl s><j>                ExecMacro("togmax")                    // <f11>                  // new arbitrarily chosen keys                // +                                                               // - reserved: taken and used by the operating system
   // not defined anymore     mLeftBtn()                             // <LeftBtn>              // new arbitrarily chosen keys                // - does not show anything in showkey                             // - does not show anything in showkey
   // not defined anymore     MouseMarking(_COLUMN_)                 // <Ctrl LeftBtn>         // new arbitrarily chosen keys                // - does not show anything in showkey                             // - does not show anything in showkey
   // not defined anymore     MouseMarking(_LINE_)                   // <Alt LeftBtn>          // new arbitrarily chosen keys                // - does not show anything in showkey                             // - does not show anything in showkey
   // not defined anymore     mShiftLeftBtn()                        // <Shift LeftBtn>        // new arbitrarily chosen keys                // - does not show anything in showkey                             // - does not show anything in showkey
   // not defined anymore     mRightBtn()                            // <RightBtn>             // new arbitrarily chosen keys                // - does not show anything in showkey                             // - reserved: taken and used by the operating system
   // not defined anymore     ResizeFont(1)                          // <Ctrl WheelUp>         // new arbitrarily chosen keys                // +                                                               // - That shows a lot of keys: <Ctrl CursorUp> <Alt [> <1> <;> <5>
   // not defined anymore     ResizeFont(-1)                         // <Ctrl WheelDown>       // new arbitrarily chosen keys                // +                                                               // - That shows a lot of keys: <Ctrl CursorDown> <Alt [> <1> <;> <5>
   // not defined anymore     RollLeft( GetWheelScrollLines())       // <Shift WheelUp>        // new arbitrarily chosen keys                // - does not show anything in showkey                             // - That shows a lot of keys: <Shift CursorUp> <Alt [> <1> <;> <2>
   // not defined anymore     RollRight(GetWheelScrollLines())       // <Shift WheelDown>      // new arbitrarily chosen keys                // - does not show anything in showkey                             // - That shows a lot of keys: <Shift CursorDown> <Alt [> <1> <;> <2>
--- cut here: end ----------------------------------------------------



Inline image

keyassignmentreplacementtseforlinux.ui

knud van eeden

unread,
May 30, 2025, 8:45:40 AM5/30/25
to SemWare TSE Pro Text Editor
 Q. TSE: Linux: How to give TSE Linux WSL and non-WSL full functionality and as much as compatibility with TSE For Windows? Checking: Hotkeys


An even more elegant method (because then you have not to change and touch the default tse.ui at all):

 1. -Backup

      cp e eORIGINAL

 2. -Create a file

      E.g.

       tseall.ui

 3. -Save this in the .ui directory where also tse.ui is located.

 4. -In it put these 2 lines:

      #include "ui/tse.ui"

      #include "ui/keyassignmentreplacementtseforlinux.ui"

 5. -quit 'e'

 6. -in the terminal type

      ./sc32 -B ui/tseall.ui

 7. -That will show a screen output similar to the following:

--- cut here: begin --------------------------------------------------

>  ./sc32 -B ui/tseall.ui

Warning 1106  (40,4)     Duplicate key defined... ignored
Warning 1106  (41,4)     Duplicate key defined... ignored

Burning configuration into file '/mnt/c/TEMP/tse_linux/tse/e'
Installation successful! Interface burned into editor.

knud van eeden

unread,
May 30, 2025, 10:09:55 AM5/30/25
to SemWare TSE Pro Text Editor
Made it easier further by including a 'helpline'
and adapting the letters to the usual letters
(e.g. c = 'copy', x = 'cut', v = 'paste'.
so easier to remember.

See the screenshot of the 'helpline' in action
(after you have pressed <CTRL s>)

and the latest keyconfiguration file attached.

Tested successfully on Linux WSL Ubuntu and Linux non-WSL Ubuntu
with TSE for Linux version 4.50 Official Release.

Inline image


keyassignmentreplacementtseforlinux.ui
tseall.ui
Reply all
Reply to author
Forward
0 new messages