Giter Club home page Giter Club logo

Comments (10)

EtchedPixels avatar EtchedPixels commented on July 17, 2024

does not fit in what sense ?

from fuzix.

erkinalp avatar erkinalp commented on July 17, 2024

Routines are hard coded according to map size. Turkish script has more letters than English script of Latin alphabet. Accented letters are outside ASCII range. So it overflows. I plan to use CP857 as Turkish encoding in order not to break assumptions in the module. I do not have a real HW keyboard controller used in a ZX128 board. Is it safe to extend map definition in size?
Keyboard layout is defined in https://github.com/EtchedPixels/FUZIX/blob/master/Kernel/platform-zx128/devtty.c .

from fuzix.

EtchedPixels avatar EtchedPixels commented on July 17, 2024

I'm still a bit confused. The spectrum keyboard matrix is only 5 rows x 8, and limited to a physical 40 keys. Changing the keymap is easy enough but given the hardware physically only supports 40 buttons.

If you've got a different set of I/O ports and map size then your platform can use a bigger keyboard map (several platforms use differing sizes including the NC100, Amstrad PCW and the Dragon port).

The rest of the kernel only sees the ascii type codes.

I would try and keep the same basic key up/down map that they all use because at some point that will want exposing to applications so people can write games or GUIs that want to read the keyboard state themselves.

from fuzix.

erkinalp avatar erkinalp commented on July 17, 2024

Scancodes would serve this job better. Others will also want to customise keyboard map.

from fuzix.

EtchedPixels avatar EtchedPixels commented on July 17, 2024

The Unix API is a byte stream and ascii (or it could be UTF8 unicode). Nothing in the video driver understands utf-8 but the change ought to be small. You'd just have to work out how to manage the font mapping efficiently.

A GUI might have different needs, and we could in theory then add a mode where we returned row/column pairs instead (and let the user space do the translations as it wanted).

from fuzix.

EtchedPixels avatar EtchedPixels commented on July 17, 2024

keyboard bitmap reporting API added. UTF-8 in the keyboard driver of a Turkish machine actually looks to be fairly easy to. Make the map table 16bit UCS2 values not 8bits/char and then write 1-2 bytes according to the unicode value.

So I don't think there is an imput problem here having looked in detail. Similarly on output your vt output routine would need to assemble unicode sequences.

from fuzix.

erkinalp avatar erkinalp commented on July 17, 2024

Changing the keymap is easy enough but given the hardware physically only supports 40 buttons.
ZX Spectrum 128 definitely has more than forty keys on its keyboard.

from fuzix.

EtchedPixels avatar EtchedPixels commented on July 17, 2024

Spectrum has 40 keys. The 128 appears to have more but they are wired in the keyboard matrix to press two buttons at once. I've actually implemented minimal unicode input support and some special encodings for byte sized keycodes to cover £ € ½.

Doing it more generally you'd just need to change your keyboard driver to generate utf-8 codes not byte ones and then queue the utf-8.

from fuzix.

erkinalp avatar erkinalp commented on July 17, 2024

14 Oca 2015 20:37 tarihinde "EtchedPixels" [email protected] yazdı:

Spectrum has 40 keys. The 128 appears to have more but they are wired in
the keyboard matrix to press two buttons at once.

So sad. It means we would have no means to have N-key rollover on ZX
Spectrum. Maybe up to three keys at once. I will have to consider this when
designing the Turkish keymap.

from fuzix.

erkinalp avatar erkinalp commented on July 17, 2024

FYI, Turkish F layout is something like this:
https://upload.wikimedia.org/wikipedia/commons/5/5d/KB_Turkey_f.svg
Ç, Ğ, İ, ı, Ü, Ö, Ş are considered separate letters from their unaccented ones in Turkish. I am planning to experiment a key reduction exercise to fit on Spectrum and the like.

from fuzix.

Related Issues (20)

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.