Opened 10 years ago

Last modified 20 months ago

#2447 new enhancement

"Caps lock" in activities.

Reported by: jg Owned by: uwog
Priority: blocker Milestone:
Component: write-activity (abiword) Version:
Keywords: 8.2.0:- 9.1.0:? Cc: Eben
Blocked By: Blocking:
Deployments affected: Action Needed: design
Verified: no


The premise of the OLPC keyboard is that the caps lock key is really evil: it leaves a trap for young kids that they can get into a mode that they cannot see, which screws up everything (including all applications at the same time).

On the other hand, when a child is learning to read and write, they first learn their upper case letters, and then lower case (at least with western alphabets; I have no clue for eastern languages).

So a case lock button in the write activity makes great sense; otherwise to write even a few sentences requires holding down the shift key.

This reminder came up in a discussion with Walter last week.

It may be too late for Trial-2 if it is invasive; on the other hand, if this is easy, it's a long overlooked bug we better get fixed ASAP.

Change History (19)

comment:1 Changed 10 years ago by uwog

So we want to use some key to act as a caps lock key and implement the capitalization ourself? (I don't have b2 at hand, so I don't remember if it actually has a caps lock key).

We do have a plugin that allows remapping key and mouse events to different actions, but at the moment it can't actually change the events (which you would needed if you implemented a "caps lock key" yourself).

comment:2 Changed 10 years ago by massimo

That's funny. I was discussing about that with bernie just a few minutes ago, since my son (3.5 years old) wanted to play with a laptop and chose the write activity, but could not easily write in uppercase (we had to hold the shift key for him). He really disliked that lack and almost threw that poor B2 on the floor. :-)
Daniele (my son) asked bernie to fix it asap because he needs a caps lock (he also asked for the green light "where is the green light?"). Bernie suggested a fn+ctrl combination, but for the led I would suggest an on-screen advice at least in the write activity.

comment:3 Changed 10 years ago by Eben

I think we want to take this from a different angle. Removing the capslock key and then replacing it with a more obscure shortcut is silly. I think we should assume that some activities will require an "uppercase" mode, but that can easily be accomplished in software. If we create an icon in the system theme for this, activities can add a toggle button to their toolbar for toggling case.

Two places we could define as a standard location for this toggle button are the Text toolbar, and the view toolbar. The latter has a very interesting implication, since it relates to the whole view and not explicitly to the text being typed. Perhaps it's not a modifier for the characters as they are input, but a global "uppercase" function that would instantly convert any document a child found on the web or got from a classmate, etc. to capital letters. As characters were input, they would also appear capitalized, but they wouldn't actually be encoded as such within the document; The standard capitalization with/without shift would apply.

This could even be useful in the web browser. I've never seen anything like that done before, but it's probably possible with some clever upper() calls that skip any text within tags, inline javascript, etc.

comment:4 Changed 10 years ago by massimo

Well, from my wife and my son's angle, not including the caps lock was not a good idea. Anyway I like the effort since I never used caps lock for anything in my life (except with early home computer editors) and I don't see why people need it.

The global on-the-fly make-all-uppercase modifier key is a really good idea since, at least with my son, I could show him how a word "translates" to lowercase or uppercase in a very easy way. But still, I am not an expert. :-)

comment:5 Changed 10 years ago by uwog

"As characters were input, they would also appear capitalized, but they wouldn't actually be encoded as such within the document; The standard capitalization with/without shift would apply."

FYI: this would require a LOT of work in abiword, if possible at all.

comment:6 Changed 10 years ago by bert

Why don't you simply switch to a font with lower case letters replaced by uppercase ones? That would work in the browser, too. Heck, this could even be a system-wide switch, just replace Vera (or whatever we're using by default) by an AllCaps variant and the whole sytem uses caps for everything.

comment:7 Changed 10 years ago by uwog

That'd work ofcourse. Then this issues component wouldn't be Write anymore, which is double good :)

comment:8 Changed 10 years ago by bert

Hehe, enabling this by default might also be a valid workaround for #2227.

comment:9 Changed 10 years ago by tomeu

Bert's suggestion looks quite good, but as a second plan, we could patch pango with a flag so it always render the uppercase letter everywhere. Not sure if it would go upstream anytime, though.

Adding a python binding for this new func, an activity could set and unset all_caps.

comment:10 Changed 10 years ago by kimquirk

  • Milestone changed from Trial-2 to Trial-3

comment:11 Changed 10 years ago by Eben

After discussing this in the design review, we found that the use case might actually be best covered by a global preference toggle for the entire machine. Of course, there are two problems with that idea. First, it would mean that we need a reasonable way to support it in all activities. Second, there would be no easy way to quickly toggle back and forth between caps and lowercase while looking at the text, which I thought was a big benefit to placing the button in the view toolbar for the activity.

I think a bit more discussion of the possible approaches and their pros/cons is needed to make the correct decision.

comment:12 Changed 9 years ago by jg

  • Milestone changed from Trial-3 to First Deployment, V1.0
  • Summary changed from "Caps lock" in write activity. to "Caps lock" in activities.

Some further discussion with Walter....
Some applications won't make sense to do this caps stuff, and can break them pretty badly if input is forced to caps.

Here's what we worked out. Have a system wide flag which says if we want caps lock on; but in fact, all input would remain in the case typed, and only *some* applications would listen to the flag, and *output* any lower case as upper case. This helps kids learning to read, who don't know their lower case, while still making it possible to deal with applications that have to have lower or mixed case input (e.g. typing a web browser URL).

comment:13 Changed 9 years ago by jg

Arrg... done in again by the person who messed with trac...

uwog, how hard is this?

comment:14 Changed 9 years ago by uwog

Hmm, at the moment I don't know what the proper way would be to implement it. Having some huge lowercase-char-to-uppercase-character mapping table somewhere maybe ?

comment:15 Changed 9 years ago by jg

I think you'll find such things in the C library, which already has such huge tables (e.g. toupper).

comment:16 Changed 9 years ago by mstone

  • Action Needed set to design
  • Keywords 8.2.0:- 9.1.0:? added
  • Milestone changed from 8.2.0 (was Update.2) to 9.1.0

comment:17 Changed 8 years ago by yfarjoun


The problem became personal (my daughter was annoyed that the display in Write do not match the strokes on the keyboard) so I fixed it in the following way:

  1. Prepare a new font that only has upper-case keys (I did it using FontForge) and I even made the "lower-case" glyphs a little smaller.
  2. Import ttf file into XO.
  3. Change the normal.abw file so that Write starts with this new font and a larger font size.

This solves the problem for me and I think it is a reasonable solution for the problem. I'd love to hear responses and I can upload the req'd files is there is demand.



comment:18 Changed 7 years ago by Quozl

Solution preferred in the Australian education system is to change the key legends to lowercase. While jg said that his education system trained in uppercase letters first, the Australian system trains in lowercase letters first.

comment:19 Changed 20 months ago by Quozl

  • Milestone 9.1.0-cancelled deleted

Milestone 9.1.0-cancelled deleted

Note: See TracTickets for help on using tickets.