Add field 'link' in a block form? I would like to had a field link in a custom block. Here is my code to do that :

public function blockForm($form, FormStateInterface $form_state)
{

$form['key_1'] = [
    '#title' =&gt; $this-&gt;t('Key 1 label'),
    '#type' =&gt; 'textfield',
    '#default_value' =&gt; '',
    '#required' =&gt; false,
];

$form['key_2'] = [
    '#title' =&gt; $this-&gt;t('key 2 link'),
    '#type' =&gt; 'link',
];

return $form;


}
Now, when I go in admin/structure/block/manage/myblock, I can see my key 1 field. The key 2 is not render. If I change the type for any other (textfield, textarea, file_managed) my field is properly render. The default link module is enabled.

Is the link field type only usable in node form ? I can understand why.
You should add the field from the Block Type interface. Either add to the block type that comes with core or create a new one and add your fields.

Also, no, Drupal Fields and Form API elements are two different constructs. That is why 'link' does nothing. It would simply be:

$form['key_2'] = [
    '#title' =&gt; $this-&gt;t('key 2 link'),
    '#type' =&gt; 'url',
];


See: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21Element%21Url.php/class/Url/8.2.x

But you're creating more work that necessary.

In this context (a form) link pertains to a RenderElement and not a FormElement like url is.