Disable Caps Lock

It could happen that you inadvertently press and it turn out all the word you write are are UPPERCASE.
To avoid this, in Linux, you can

  • go to System Settings > Input Devices > Keyboard -> Key bindigs
  • in Key bindings -> Configure Keybord options -> Caps Lock behavior -> Caps Lock disabled.
  • and then, always in Configure Keybord options -> switching to another layout -> select both
    • Both Shifts together
    • Caps Lock.

In this way your Caps Lock will be usually disabled, but you can use it by pressing both the shift keys.

BUT…
If you have wayland and espanso the upper configuration can give problems.
So the simpler way is:

  • to disable (permanently) caps lock : Key bindings -> Configure Keybord options -> Caps Lock behavior -> Make Caps Lock an additional Ctrl

Espanso

A very useful feature of espanso (a text expander also for wayland) is the possibility to convert the clipboard content to lowercase (with ::low) or to uppercase (with ::up).

python script per cycle case (lower – mixed – upper)

Utile con autokey. Eccolo:

pre.CICodeFormatter{
font-family:arial;
font-size:12px;
border:1px dashed #CCCCCC;
width:99%;
height:auto;
overflow:auto;
background:#f0f0f0;
line-height:20px;
background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);
padding:0px;
color:#000000;
text-align:left;
}
pre.CICodeFormatter code{
color:#000000;
word-wrap:normal;
}

 # Get the current selection.  
 sText=clipboard.get_selection()  
 lLength=len(sText)  
   
 try:  
   if not store.has_key("textCycle"):  
     store.set_value("state","title")  
   
 except:  
   pass  
   
 # get saved value of textCycle  
 state = store.get_value("textCycle")  
   
   
 # modify text and set next modfication style  
 if state == "title":  
   #sText=sText.capitalize()  
   sText=sText.title()  
   newstate = "lower"  
   
 elif state == "lower":  
   sText=sText.lower()  
   newstate = "upper"  
   
 elif state == "upper":  
   sText=sText.upper()  
   newstate = "title"  
   
 else:  
   newstate = "lower"  
   
 # save for next run of script  
 store.set_value("textCycle",newstate)    
   
 # Send the result.  
 keyboard.send_keys(sText)  
 keyboard.send_keys("<shift>+<left>"*lLength)