GithubHelp home page GithubHelp logo

vdp-gl's People

Contributors

avalonbits avatar breakintoprogram avatar fdivitto avatar gaiusjocundus avatar lennart-benschop avatar pvmm avatar sijnstra avatar stevesims avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vdp-gl's Issues

Forcing terminal mode to be 80 columns width rather than default 85

I've noticed that the terminal mode has default 85 rather than 80 columns. This causes a number of cosmetic issues.

There will be many ways to achieve this. I have written a quick and easy patch to force the 80 column mode VT100 escape sequence to be 80 at maximum, so leaving it as-is when first selected but forcing to 80 when 80 column mode is used.

A more complete way to do this might be to implement the terminal resize function, however, this isn't VT100 and I'm not sure if it's strictly ANSI although it is relatively standard on Xwindows terminals.

I will share a PR for my quick version once we have the other PR resolved.

Timing for new Release

To take advantage of the updates, we will need a new release published. Would it be possible to have a timeline set so that the updated release can be published before 1.04 goes final?

Additional terminal capaibility: ADDS25

I am in need of the Agon to have additional terminal emulation, in particular the ADDS25 terminal, so I built it.

I've done the initial coding for the majority of the features. There are a few things I needed to add the ConvCtrl mappings, and there are 3 which I cannot find a primitive to map to, but they will not impact most use cases. It certainly works for my purpose (support of TRS-OS), and I think additional terminal mode support for additional terminal types will benefit other retro people out there.

Thoughts or concerns?

Some keyboard layouts have bugs.

It may not be too relevant for Agon itself, as most programs are in English and we use only ASCII characters for text. But it may be good to upstream to original FabGL See src/devdrivers/kbdlayouts.cpp

  • German layout: has no shift rules to translate VK_UMLAUT_a to VK_UMLAUT_A, same for VK_UMLAUT_o and VK_UMLAUT_u. So it's not [possible to type capital Ä Ö and Ü
  • French layout: dead key rules for VK_DIAERESIS translate vowel keys to VK_CARET_a/e/i/o/u instead of VK_UMLAUT_a/e/i/o/u. VK_UMLAUT_y should also be included.
  • src/codepages.cpp misses the Scandinavian characters for Æ, Ø and Å. Even though the Norwegian keyboard layout specifies VK_aelig, VK_oslash and VK_aring, the translation to characters in either CP437 or CP1252 does not get them.

Want to add some more keys to some layouts.

French layout: it appears to be impossible to type a caret (^) by itself. It is always treated as a dead key and does not combine with space to form a ^ by itself. AltGr-9 should produce a caret by itself without being a dead key. Caret is the Power operator in BBC-Basic. (A^3 == a to the power of 3).

Belgian layout: Shift-µ should be £.
Swiss and US-international layouts could give us the cents character (which is now there for Brazilian).
But I think these are less important. The ASCII characters matter if you are going to write programs.

This split vdp-gl and agon-vdp is far from ideal to get good testing by more people.
We should have beta tests with people from various countries who are familiar with their own national keyboard layouts.

Adding Dvorak Support

I'd like to propose the following change to add the Dvorak US keyboard layout:

diff --git a/src/devdrivers/kbdlayouts.cpp b/src/devdrivers/kbdlayouts.cpp
index a4eeb935..9e617087 100644
--- a/src/devdrivers/kbdlayouts.cpp
+++ b/src/devdrivers/kbdlayouts.cpp
@@ -2270,5 +2270,57 @@ const KeyboardLayout BrazilianPortugueseLayout {
   },
 };
 
+/**************************************************************************************/
+/* Dvorak US LAYOUT                                                                   */
+/**************************************************************************************/
+const KeyboardLayout DvorakLayout {
+  // name
+  "dvorak",
+
+  // desc
+  "Dvorak US",
+
+  // inherited layout
+  &USLayout,
+
+  // single byte scancodes
+  {
+    { 0x15, VK_QUOTE },
+    { 0x1D, VK_COMMA },
+    { 0x24, VK_PERIOD },
+    { 0x2D, VK_p },
+    { 0x2C, VK_y },
+    { 0x35, VK_f },
+    { 0x3C, VK_g },
+    { 0x43, VK_c },
+    { 0x44, VK_r },
+    { 0x4D, VK_l },
+    { 0x1C, VK_a },
+    { 0x1b, VK_o },
+    { 0x23, VK_e },
+    { 0x2b, VK_u },
+    { 0x34, VK_i },
+    { 0x33, VK_d },
+    { 0x3B, VK_h },
+    { 0x42, VK_t },
+    { 0x4B, VK_n },
+    { 0x1A, VK_SEMICOLON },
+    { 0x22, VK_q },
+    { 0x21, VK_j },
+    { 0x2A, VK_k },
+    { 0x32, VK_x },
+    { 0x31, VK_b },
+    { 0x3A, VK_m },
+    { 0x4E, VK_LEFTBRACKET },
+    { 0x55, VK_RIGHTBRACKET },
+    { 0x54, VK_SLASH },
+    { 0x5B, VK_EQUALS },
+    { 0x4C, VK_s },
+    { 0x52, VK_MINUS },
+    { 0x41, VK_w },
+    { 0x49, VK_v },
+    { 0x4A, VK_z },
+  }
+};
 
 } // end of namespace
diff --git a/src/devdrivers/kbdlayouts.h b/src/devdrivers/kbdlayouts.h
index 86697e48..12e7a7c8 100644
--- a/src/devdrivers/kbdlayouts.h
+++ b/src/devdrivers/kbdlayouts.h
@@ -144,12 +144,14 @@ extern const KeyboardLayout PortugueseLayout;
 /** @brief Brazilian Portuguese keyboard layout */
 extern const KeyboardLayout BrazilianPortugueseLayout;
   
-
+/** @brief Dvorak keyboard layout */
+extern const KeyboardLayout DvorakLayout;
   
 
+
 struct SupportedLayouts {
 
-  static constexpr int LAYOUTSCOUNT = 17;
+  static constexpr int LAYOUTSCOUNT = 18;
 
   static int count()               { return LAYOUTSCOUNT; }
 
@@ -172,6 +174,7 @@ struct SupportedLayouts {
        SwedishLayout.desc,
        PortugueseLayout.desc,
        BrazilianPortugueseLayout.desc,
+  DvorakLayout.desc,
     };
     return NAMES;
   }
@@ -195,6 +198,7 @@ struct SupportedLayouts {
        SwedishLayout.name,
        PortugueseLayout.name,
        BrazilianPortugueseLayout.name,
+  DvorakLayout.name,
     };
     return SNAMES;
   }
@@ -218,6 +222,7 @@ struct SupportedLayouts {
        &SwedishLayout,
        &PortugueseLayout,
        &BrazilianPortugueseLayout,
+  &DvorakLayout,
     };
     return LAYOUTS;
   }

I can create a PR as soon as this issue is discussed/approved.

I've tested this change on my agon light 2 and can type dvorak freely.

Want to add more keyboard layouts.

I see Brazilian Portuguese is in the pipeline.

I definitely want to add US-International with dead keys (main layout used in The Netherlands when typing Dutch text with diacritics).

Other layouts that seem to make sense to have (and that have all their characters on CP252):

  • Danish
  • Swedish
  • Swiss
  • European Portuguese

Dead key followed by space keeps deadkey active for next character.

With the latest layout fixes, there is still an annoying bug for international layouts containing dead keys. I hope a fix for this can still be pushed before the next major Agon VDP release.

When you press a dead key (like Accent-Grave in the Spanish layout) and then you press space to get the accent-grave character by itself, the dead key does not disengage and the next key pressed (either space or one of the vowels) gets combined with the accent-grave.

How to reproduce:

  • Select Spanish keyboard layout using *SET KEYBOARD 4
  • Press the key to the right of the P. In the Spanish layout this is accent-grave (`) in the US layout this is left-square bracket ([)
  • Press Space. You now get the ` character (left quote, accent-grave), not combined with any character.
  • Press Space again. You get ` again instead of a regular space.
    The dead key should apply once and then disengage.

Probably a single line fix in keyboard.cpp will solve this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.