Fixes not being able to send UTF8 characters anymore
This commit is contained in:
		
					parent
					
						
							
								6486d80f87
							
						
					
				
			
			
				commit
				
					
						94e52f0738
					
				
			
		
					 2 changed files with 6 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -159,6 +159,7 @@ ui::KeyboardCode KeyboardCodeFromKeyIdentifier(const std::string& s,
 | 
			
		|||
      return ui::VKEY_UNKNOWN;
 | 
			
		||||
    }
 | 
			
		||||
  } else {
 | 
			
		||||
    if (str.size() > 2)
 | 
			
		||||
      LOG(WARNING) << "Invalid accelerator token: " << str;
 | 
			
		||||
    return ui::VKEY_UNKNOWN;
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -176,9 +176,10 @@ bool Converter<blink::WebKeyboardEvent>::FromV8(
 | 
			
		|||
  out->setKeyIdentifierFromWindowsKeyCode();
 | 
			
		||||
  if ((out->type == blink::WebInputEvent::Char ||
 | 
			
		||||
       out->type == blink::WebInputEvent::RawKeyDown) &&
 | 
			
		||||
      str.size() == 1) {
 | 
			
		||||
    out->text[0] = str[0];
 | 
			
		||||
    out->unmodifiedText[0] = str[0];
 | 
			
		||||
      str.size() <= 2) {
 | 
			
		||||
    base::string16 code = base::UTF8ToUTF16(str);
 | 
			
		||||
    out->text[0] = code[0];
 | 
			
		||||
    out->unmodifiedText[0] = code[0];
 | 
			
		||||
  }
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue